]> granicus.if.org Git - postgresql/commit
Fix AfterTriggerSaveEvent to use a test and elog, not just Assert, to check
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 27 Oct 2009 20:15:04 +0000 (20:15 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 27 Oct 2009 20:15:04 +0000 (20:15 +0000)
commitb9d803bc82954dd7278f28b7470a6d3943f80ef9
treebf013ef35980f1de5ef7819a6add06469a3d7e7d
parent0407c835c81f47313058e7c41f354a57278f1311
Fix AfterTriggerSaveEvent to use a test and elog, not just Assert, to check
that it's called within an AfterTriggerBeginQuery/AfterTriggerEndQuery pair.
The RI cascade triggers suppress that overhead on the assumption that they
are always run non-deferred, so it's possible to violate the condition if
someone mistakenly changes pg_trigger to mark such a trigger deferred.
We don't really care about supporting that, but throwing an error instead
of crashing seems desirable.  Per report from Marcelo Costa.
src/backend/commands/trigger.c