aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorEtsuro Fujita <efujita@postgresql.org>2019-12-10 18:00:30 +0900
committerEtsuro Fujita <efujita@postgresql.org>2019-12-10 18:00:30 +0900
commit5a20b0219e7684788a1b63e812dd44b31361b259 (patch)
treee4bde3390e3ee82a90a5cf19f748aeec8be2506e /src/backend/tcop/postgres.c
parent28e6a2fd6358c1b75ce2f4e7cb3fcff979dbe539 (diff)
downloadpostgresql-5a20b0219e7684788a1b63e812dd44b31361b259.tar.gz
postgresql-5a20b0219e7684788a1b63e812dd44b31361b259.zip
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
Diffstat (limited to 'src/backend/tcop/postgres.c')
0 files changed, 0 insertions, 0 deletions