postgresql/contrib/postgres_fdw
Etsuro Fujita 2144601821 postgres_fdw: Account for triggers in non-direct remote UPDATE planning.
Previously, in postgresPlanForeignModify, we planned an UPDATE operation
on a foreign table so that we transmit only columns that were explicitly
targets of the UPDATE, so as to avoid unnecessary data transmission, but
if there were BEFORE ROW UPDATE triggers on the foreign table, those
triggers might change values for non-target columns, in which case we
would miss sending changed values for those columns.  Prevent optimizing
away transmitting all columns if there are BEFORE ROW UPDATE triggers on
the foreign table.

This is an oversight in commit 7cbe57c34 which added triggers on foreign
tables, so apply the patch all the way back to 9.4 where that came in.

Author: Shohei Mochizuki
Reviewed-by: Amit Langote
Discussion: https://postgr.es/m/201905270152.x4R1q3qi014550@toshiba.co.jp
2019-06-13 17:59:11 +09:00
..
expected postgres_fdw: Account for triggers in non-direct remote UPDATE planning. 2019-06-13 17:59:11 +09:00
sql postgres_fdw: Account for triggers in non-direct remote UPDATE planning. 2019-06-13 17:59:11 +09:00
.gitignore Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
connection.c Improve style guideline compliance of assorted error-report messages. 2018-03-22 17:33:10 -04:00
deparse.c Avoid postgres_fdw crash for a targetlist entry that's just a Param. 2019-04-27 13:15:54 -04:00
Makefile Prevent accidental linking of system-supplied copies of libpq.so etc. 2018-04-03 16:26:05 -04:00
option.c Improve style guideline compliance of assorted error-report messages. 2018-03-22 17:33:10 -04:00
postgres_fdw--1.0.sql Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
postgres_fdw.c postgres_fdw: Account for triggers in non-direct remote UPDATE planning. 2019-06-13 17:59:11 +09:00
postgres_fdw.control Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
postgres_fdw.h Avoid postgres_fdw crash for a targetlist entry that's just a Param. 2019-04-27 13:15:54 -04:00
shippable.c Update copyright for 2018 2018-01-02 23:30:12 -05:00