postgresql/contrib/postgres_fdw
Etsuro Fujita 8b6da83d16 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:09 +09:00
..
expected postgres_fdw: Account for triggers in non-direct remote UPDATE planning. 2019-06-13 17:59:09 +09:00
sql postgres_fdw: Account for triggers in non-direct remote UPDATE planning. 2019-06-13 17:59:09 +09:00
.gitignore Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
Makefile Prevent accidental linking of system-supplied copies of libpq.so etc. 2018-04-03 16:26:05 -04:00
connection.c postgres_fdw: Reorder C includes. 2019-06-11 13:39:31 +09:00
deparse.c Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
option.c Update copyright for 2019 2019-01-02 12:44:25 -05: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:09 +09:00
postgres_fdw.control Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
postgres_fdw.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
shippable.c Update copyright for 2019 2019-01-02 12:44:25 -05:00