Fix trigger WHEN conditions when both BEFORE and AFTER triggers exist. Due to tuple-slot mismanagement, evaluation of WHEN conditions for AFTER ROW UPDATE triggers could crash if there had been a BEFORE ROW trigger fired for the same update. Fix by not trying to overload the use of estate->es_trig_tuple_slot. Per report from Yoran Heling.
Back-patch to 9.0, when trigger WHEN conditions were introduced. Branch ------ REL9_1_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/38c9eb8fee298a9242bb2049c4fdf94407187d0c Modified Files -------------- src/backend/commands/trigger.c | 6 +++--- src/backend/executor/execMain.c | 1 + src/backend/executor/execUtils.c | 1 + src/include/nodes/execnodes.h | 8 +++++++- src/test/regress/expected/triggers.out | 29 +++++++++++++++++++++++++++++ src/test/regress/sql/triggers.sql | 26 ++++++++++++++++++++++++++ 6 files changed, 67 insertions(+), 4 deletions(-) -- Sent via pgsql-committers mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
