From: | tgl(at)postgresql(dot)org (Tom Lane) |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix AfterTriggerSaveEvent to use a test and elog, not just |
Date: | 2009-10-27 20:14:27 |
Message-ID: | 20091027201427.3DD85753FB7@cvs.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Log Message:
-----------
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.
Modified Files:
--------------
pgsql/src/backend/commands:
trigger.c (r1.255 -> r1.256)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/trigger.c?r1=1.255&r2=1.256)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-10-27 20:14:33 | pgsql: Fix AfterTriggerSaveEvent to use a test and elog, not just |
Previous Message | Tom Lane | 2009-10-27 17:11:30 | pgsql: Make FOR UPDATE/SHARE in the primary query not propagate into |