Fix mishandling of after-trigger state when a SQL function returns multiple
authorTom Lane <[email protected]>
Thu, 12 Oct 2006 17:02:34 +0000 (17:02 +0000)
committerTom Lane <[email protected]>
Thu, 12 Oct 2006 17:02:34 +0000 (17:02 +0000)
commit78420afd58c92ace69133ff051bd1901b29b34f2
tree38102262cbed88310b7ace64fa4284f9457a38d1
parentfe1c6e8898a1d17873f6c70096aaa12ace0c2717
Fix mishandling of after-trigger state when a SQL function returns multiple
rows --- if the surrounding query queued any trigger events between the rows,
the events would be fired at the wrong time, leading to bizarre behavior.
Per report from Merlin Moncure.

This is a simple patch that should solve the problem fully in the back
branches, but in HEAD we also need to consider the possibility of queries
with RETURNING clauses.  Will look into a fix for that separately.
src/backend/executor/functions.c