postgresql/src/backend
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
..
access Fix thinkos from commit 9989d37 2019-12-03 18:59:09 +09:00
bootstrap Remove configure --disable-float4-byval 2019-11-21 18:29:21 +01:00
catalog Fix misbehavior with expression indexes on ON COMMIT DELETE ROWS tables. 2019-12-01 13:09:26 -05:00
commands Fix handling of multiple AFTER ROW triggers on a foreign table. 2019-12-10 18:00:30 +09:00
executor Fix comments in execGrouping.c 2019-12-06 11:49:59 -08:00
foreign Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
jit Remove useless "return;" lines 2019-11-28 16:48:37 -03:00
lib Make StringInfo available to frontend code. 2019-11-05 14:56:40 -08:00
libpq Remove useless "return;" lines 2019-11-28 16:48:37 -03:00
main Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
nodes Add a reverse-translation column number array to struct AppendRelInfo. 2019-12-02 18:05:29 -05:00
optimizer Fix EXPLAIN's column alias output for mismatched child tables. 2019-12-02 19:08:10 -05:00
parser Disallow non-default collation in ADD PRIMARY KEY/UNIQUE USING INDEX. 2019-12-06 11:25:09 -05:00
partitioning Make the order of the header file includes consistent in backend modules. 2019-11-12 08:30:16 +05:30
po Translation updates 2019-06-17 15:30:20 +02:00
port Fix race condition in our Windows signal emulation. 2019-12-09 15:03:51 -05:00
postmaster Use procsignal_sigusr1_handler for auxiliary processes. 2019-11-25 16:16:27 -05:00
regex Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
replication Remove XLogFileNameP() from the tree 2019-12-03 15:06:04 +09:00
rewrite Remove useless "return;" lines 2019-11-28 16:48:37 -03:00
snowball Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
statistics Remove unnecessary clauses_attnums variable 2019-11-28 23:25:14 +01:00
storage Add safeguards for pg_fsync() called with incorrectly-opened fds 2019-11-26 13:32:52 +09:00
tcop Stabilize NOTIFY behavior by transmitting notifies before ReadyForQuery. 2019-11-24 14:42:59 -05:00
tsearch Make the order of the header file includes consistent in backend modules. 2019-11-12 08:30:16 +05:30
utils Fix typos in miscinit.c. 2019-12-09 08:39:34 +05:30
.gitignore
common.mk
Makefile Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
nls.mk