summaryrefslogtreecommitdiff
path: root/src/include/nodes/execnodes.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2011-08-21 18:15:55 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2011-08-21 18:15:55 -0400
commitb33f78df17c32364d51f6e5128f8d81d7d3013a2 (patch)
treed5acbc5668d0f60aa8befbb1ae42f807c447df6c /src/include/nodes/execnodes.h
parent6cc08e703bb078ee1e8d183caf4596d62bf12bf7 (diff)
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.
Diffstat (limited to 'src/include/nodes/execnodes.h')
-rw-r--r--src/include/nodes/execnodes.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index a3a93100558..6ed739c290c 100644
--- a/src/include/nodes/execnodes.h
+++ b/src/include/nodes/execnodes.h
@@ -354,7 +354,8 @@ typedef struct EState
/* Stuff used for firing triggers: */
List *es_trig_target_relations; /* trigger-only ResultRelInfos */
TupleTableSlot *es_trig_tuple_slot; /* for trigger output tuples */
- TupleTableSlot *es_trig_oldtup_slot; /* for trigger old tuples */
+ TupleTableSlot *es_trig_oldtup_slot; /* for TriggerEnabled */
+ TupleTableSlot *es_trig_newtup_slot; /* for TriggerEnabled */
/* Parameter info: */
ParamListInfo es_param_list_info; /* values of external params */