diff options
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/commands/trigger.c | 6 | ||||
-rw-r--r-- | src/backend/executor/execMain.c | 1 | ||||
-rw-r--r-- | src/backend/executor/execUtils.c | 1 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c index 4c31f19af95..680962aa444 100644 --- a/src/backend/commands/trigger.c +++ b/src/backend/commands/trigger.c @@ -2770,13 +2770,13 @@ TriggerEnabled(EState *estate, ResultRelInfo *relinfo, } if (HeapTupleIsValid(newtup)) { - if (estate->es_trig_tuple_slot == NULL) + if (estate->es_trig_newtup_slot == NULL) { oldContext = MemoryContextSwitchTo(estate->es_query_cxt); - estate->es_trig_tuple_slot = ExecInitExtraTupleSlot(estate); + estate->es_trig_newtup_slot = ExecInitExtraTupleSlot(estate); MemoryContextSwitchTo(oldContext); } - newslot = estate->es_trig_tuple_slot; + newslot = estate->es_trig_newtup_slot; if (newslot->tts_tupleDescriptor != tupdesc) ExecSetSlotDescriptor(newslot, tupdesc); ExecStoreTuple(newtup, newslot, InvalidBuffer, false); diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index eacd863647d..1dfe8b9ac78 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -871,6 +871,7 @@ InitPlan(QueryDesc *queryDesc, int eflags) estate->es_tupleTable = NIL; estate->es_trig_tuple_slot = NULL; estate->es_trig_oldtup_slot = NULL; + estate->es_trig_newtup_slot = NULL; /* mark EvalPlanQual not active */ estate->es_epqTuple = NULL; diff --git a/src/backend/executor/execUtils.c b/src/backend/executor/execUtils.c index 073ef8d23b3..63e3d927726 100644 --- a/src/backend/executor/execUtils.c +++ b/src/backend/executor/execUtils.c @@ -124,6 +124,7 @@ CreateExecutorState(void) estate->es_trig_target_relations = NIL; estate->es_trig_tuple_slot = NULL; estate->es_trig_oldtup_slot = NULL; + estate->es_trig_newtup_slot = NULL; estate->es_param_list_info = NULL; estate->es_param_exec_vals = NULL; |