]> git.ipfire.org Git - thirdparty/postgresql.git/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:56 +0000 (20:14 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 27 Oct 2009 20:14:56 +0000 (20:14 +0000)
commit08dd656b71202911be7bcf4f554558a18138c867
tree5b9b189e0b5f7bbb65e20ff93e470343534db83b
parent53c8f77da0016f867efeb58fbd6fe23eee729b93
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