Alvaro Herrera <alvherre@dcc.uchile.cl> writes:
> One further question is if it's right for the holdable portal to fire
> trigger at transaction commit. ISTM the non-surprising answer would be
> for them to fire at FETCH time. (But of course this is hard to
> implement, since at that time we don't have executor machinery ...)
Our definition of a holdable cursor is that the query execution is
completed during transaction commit, and all you have left after that
is a static image of the results. So it's consistent to fire any
associated triggers during commit, too.
regards, tom lane