mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
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.
This commit is contained in:
@ -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 */
|
||||
|
Reference in New Issue
Block a user