]> 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:14:33 +0000 (20:14 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 27 Oct 2009 20:14:33 +0000 (20:14 +0000)
commitf18a77acc842ef466128d9ee6b5e26d63d19d1bf
tree3ec88fdc5f3cc4b0808ab3f77e00fd7861756b62
parentbd02b48ba44c6e0593320a9c3e071ba78efe1c04
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