diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2022-07-07 11:23:40 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2022-07-07 11:23:40 -0400 |
commit | 88210542106de5b26fe6aa088d1811b68502d224 (patch) | |
tree | 8a77c331d7a9b3995ac0e0323803bb5e112f4e91 /src/backend/executor/nodeMergejoin.c | |
parent | 62c46eee2279eb0300ab7ffe393d0d0dcfafb157 (diff) | |
download | postgresql-88210542106de5b26fe6aa088d1811b68502d224.tar.gz postgresql-88210542106de5b26fe6aa088d1811b68502d224.zip |
Remove stray references to lefttree/righttree in the executor.
The general convention in the executor is to refer to child plans
and planstates via the outerPlan[State] and innerPlan[State]
macros, but a few places didn't do it like that. For consistency
and readability, convert all the stragglers to use the macros.
(See also commit 40f42d2a3, which did some similar cleanup a few
years ago, but missed these cases.)
Richard Guo
Discussion: https://postgr.es/m/CAMbWs4-vYhh1xsa_veah4PUed2Xq=Ed_YH3=Mqt5A3Y=EgfCEg@mail.gmail.com
Diffstat (limited to 'src/backend/executor/nodeMergejoin.c')
-rw-r--r-- | src/backend/executor/nodeMergejoin.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/backend/executor/nodeMergejoin.c b/src/backend/executor/nodeMergejoin.c index 864e3baf86b..fed345eae54 100644 --- a/src/backend/executor/nodeMergejoin.c +++ b/src/backend/executor/nodeMergejoin.c @@ -1658,6 +1658,9 @@ ExecEndMergeJoin(MergeJoinState *node) void ExecReScanMergeJoin(MergeJoinState *node) { + PlanState *outerPlan = outerPlanState(node); + PlanState *innerPlan = innerPlanState(node); + ExecClearTuple(node->mj_MarkedTupleSlot); node->mj_JoinState = EXEC_MJ_INITIALIZE_OUTER; @@ -1670,8 +1673,8 @@ ExecReScanMergeJoin(MergeJoinState *node) * if chgParam of subnodes is not null then plans will be re-scanned by * first ExecProcNode. */ - if (node->js.ps.lefttree->chgParam == NULL) - ExecReScan(node->js.ps.lefttree); - if (node->js.ps.righttree->chgParam == NULL) - ExecReScan(node->js.ps.righttree); + if (outerPlan->chgParam == NULL) + ExecReScan(outerPlan); + if (innerPlan->chgParam == NULL) + ExecReScan(innerPlan); } |