From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix trigger WHEN conditions when both BEFORE and AFTER triggers |
Date: | 2011-08-21 22:16:40 |
Message-ID: | E1QvGJs-0002oT-Rv@gemulon.postgresql.org |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/b33f78df17c32364d51f6e5128f8d81d7d3013a2
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 | 3 ++-
src/test/regress/expected/triggers.out | 29 +++++++++++++++++++++++++++++
src/test/regress/sql/triggers.sql | 26 ++++++++++++++++++++++++++
6 files changed, 62 insertions(+), 4 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2011-08-22 01:24:32 | pgsql: Simplify errno generating in thread testing program. |
Previous Message | Bruce Momjian | 2011-08-20 22:22:30 | pgsql: Have thread_test create its test files in the current directory, |