pgsql: Fix handling of multiple AFTER ROW triggers on a foreign table.

2019-12-10 Thread Etsuro Fujita
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(

pgsql: Fix handling of multiple AFTER ROW triggers on a foreign table.

2019-12-10 Thread Etsuro Fujita
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(