Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>,
Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>,
Ildus Kurbangaliev <i.kurbangaliev@postgrespro.ru>,
Dilip Kumar <dilipbalaut@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>,
Robert Haas <robertmhaas@gmail.com>
Date: 2017-11-27T16:35:36Z
Lists: pgsql-hackers
I wrote: > Dean Rasheed <dean.a.rasheed@gmail.com> writes: >> A separate point -- it might be marginally more efficient to have the >> work of rewriteTargetListUD() done after expand_targetlist() to avoid >> the possible renumbering of the resjunk entries. > Hm. It wouldn't save a lot, but yeah, doing it in this order seems > a bit silly when you put it like that. On looking closer, the reason it's like that in Fujita-san's patch is to minimize the API churn seen by FDW AddForeignUpdateTargets functions, specifically whether they see a tlist that's before or after what expand_targetlist() does. I'm doubtful that the potential savings is worth taking risks there. In particular, it seems like a good thing that expand_targetlist() verifies the correct tlist ordering *after* the FDW function has acted. So now my inclination is to leave this alone. regards, tom lane
Commits
-
Fix creation of resjunk tlist entries for inherited mixed UPDATE/DELETE.
- 39f180fdd1e6 9.5.11 landed
- 06ba5309682e 9.6.7 landed
- a57aa430b613 10.2 landed
- 9a785ad57317 11.0 landed