Skip to content

Commit 22b73d3

Browse files
committed
Fix initialization of es_result_relations in EvalPlanQualStart().
Thinko in commit 1375422. EvalPlanQualStart() was mistakenly resetting the parent EState's es_result_relations, when it should initialize the field in the child EPQ EState it just created. That was clearly wrong, but it didn't cause any ill effects, because es_result_relations is currently not used after the ExecInit* phase. Author: Amit Langote Discussion: https://www.postgresql.org/message-id/CA%2BHiwqFEuq8AAAmxXsTDVZ1r38cHbfYuiPQx_%3DYyKe2DC-6q4A%40mail.gmail.com
1 parent 783f0cc commit 22b73d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/executor/execMain.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2693,7 +2693,7 @@ EvalPlanQualStart(EPQState *epqstate, Plan *planTree)
26932693
* ResultRelInfos needed by subplans are initialized from scratch when the
26942694
* subplans themselves are initialized.
26952695
*/
2696-
parentestate->es_result_relations = NULL;
2696+
rcestate->es_result_relations = NULL;
26972697
/* es_trig_target_relations must NOT be copied */
26982698
rcestate->es_top_eflags = parentestate->es_top_eflags;
26992699
rcestate->es_instrument = parentestate->es_instrument;

0 commit comments

Comments
 (0)