postgresql/contrib/postgres_fdw
Etsuro Fujita 5a20b0219e Fix handling of multiple AFTER ROW triggers on a foreign table.
AfterTriggerExecute() retrieves a fresh tuple or pair of tuples from a
tuplestore and then stores the tuple(s) in the passed-in slot(s) if
AFTER_TRIGGER_FDW_FETCH, while it uses the most-recently-retrieved
tuple(s) stored in the slot(s) if AFTER_TRIGGER_FDW_REUSE.  This was
done correctly before 12, but commit ff11e7f4b broke it by mistakenly
clearing the tuple(s) stored in the slot(s) in that function, leading to
an assertion failure as reported in bug #16139 from Alexander Lakhin.

Also, fix some other issues with the aforementioned commit in passing:

* For tg_newslot, which is a slot added to the TriggerData struct by the
  commit to store new updated tuples, it didn't ensure the slot was NULL
  if there was no such tuple.
* The commit failed to update the documentation about the trigger
  interface.

Author: Etsuro Fujita
Backpatch-through: 12
Discussion: https://postgr.es/m/16139-94f9ccf0db6119ec%40postgresql.org
2019-12-10 18:00:30 +09:00
..
expected Fix handling of multiple AFTER ROW triggers on a foreign table. 2019-12-10 18:00:30 +09:00
sql Fix handling of multiple AFTER ROW triggers on a foreign table. 2019-12-10 18:00:30 +09:00
.gitignore Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
Makefile Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
connection.c postgres_fdw: Fix error message for PREPARE TRANSACTION. 2019-11-08 17:00:30 +09:00
deparse.c Make the order of the header file includes consistent in contrib modules. 2019-10-24 08:05:34 +05:30
option.c Make the order of the header file includes consistent in contrib modules. 2019-10-24 08:05:34 +05:30
postgres_fdw--1.0.sql Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
postgres_fdw.c Further sync postgres_fdw's "Relations" output with the rest of EXPLAIN. 2019-12-03 12:25:56 -05:00
postgres_fdw.control Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
postgres_fdw.h Make postgres_fdw's "Relations" output agree with the rest of EXPLAIN. 2019-12-02 16:31:03 -05:00
shippable.c Make the order of the header file includes consistent in contrib modules. 2019-10-24 08:05:34 +05:30