Re: 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: Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
Cc: 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-07-19T14:36:51Z
Lists: pgsql-hackers
Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp> writes: > * Modified rewrite_targetlist(), which is a new function added to > preptlist.c, so that we do const-simplification to junk TLEs that > AddForeignUpdateTargets() added, as that API allows the FDW to add junk > TLEs containing non-Var expressions to the query's targetlist. This does not seem like a good idea to me. eval_const_expressions is not a cheap thing, and for most use-cases those cycles will be wasted, and it has never been the responsibility of preprocess_targetlist to do this sort of thing. Please put the responsibility of doing const-expression simplification in these cases somewhere closer to where the problem is being created. 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