Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd578901

Browse files
committed
Remove useless ps_OuterTupleSlot field from PlanState. I suppose this was
used long ago, but in the current code the ecxt_outertuple field ofExprContext is doing all the work. Spotted by Ran Tang.
1 parent7356381 commitd578901

File tree

3 files changed

+6
-20
lines changed

3 files changed

+6
-20
lines changed

‎src/backend/executor/nodeHashjoin.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/executor/nodeHashjoin.c,v 1.95 2008/08/15 19:20:42 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/executor/nodeHashjoin.c,v 1.96 2008/10/23 14:34:34 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -193,7 +193,6 @@ ExecHashJoin(HashJoinState *node)
193193
returnNULL;
194194
}
195195

196-
node->js.ps.ps_OuterTupleSlot=outerTupleSlot;
197196
econtext->ecxt_outertuple=outerTupleSlot;
198197
node->hj_NeedNewOuter= false;
199198
node->hj_MatchedOuter= false;
@@ -482,7 +481,6 @@ ExecInitHashJoin(HashJoin *node, EState *estate, int eflags)
482481
/* child Hash node needs to evaluate inner hash keys, too */
483482
((HashState*)innerPlanState(hjstate))->hashkeys=rclauses;
484483

485-
hjstate->js.ps.ps_OuterTupleSlot=NULL;
486484
hjstate->js.ps.ps_TupFromTlist= false;
487485
hjstate->hj_NeedNewOuter= true;
488486
hjstate->hj_MatchedOuter= false;
@@ -884,7 +882,6 @@ ExecReScanHashJoin(HashJoinState *node, ExprContext *exprCtxt)
884882
node->hj_CurBucketNo=0;
885883
node->hj_CurTuple=NULL;
886884

887-
node->js.ps.ps_OuterTupleSlot=NULL;
888885
node->js.ps.ps_TupFromTlist= false;
889886
node->hj_NeedNewOuter= true;
890887
node->hj_MatchedOuter= false;

‎src/backend/executor/nodeNestloop.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/executor/nodeNestloop.c,v 1.48 2008/08/15 19:20:42 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/executor/nodeNestloop.c,v 1.49 2008/10/23 14:34:34 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -78,12 +78,6 @@ ExecNestLoop(NestLoopState *node)
7878
innerPlan=innerPlanState(node);
7979
econtext=node->js.ps.ps_ExprContext;
8080

81-
/*
82-
* get the current outer tuple
83-
*/
84-
outerTupleSlot=node->js.ps.ps_OuterTupleSlot;
85-
econtext->ecxt_outertuple=outerTupleSlot;
86-
8781
/*
8882
* Check to see if we're still projecting out tuples from a previous join
8983
* tuple (because there is a function-returning-set in the projection
@@ -135,7 +129,6 @@ ExecNestLoop(NestLoopState *node)
135129
}
136130

137131
ENL1_printf("saving new outer tuple information");
138-
node->js.ps.ps_OuterTupleSlot=outerTupleSlot;
139132
econtext->ecxt_outertuple=outerTupleSlot;
140133
node->nl_NeedNewOuter= false;
141134
node->nl_MatchedOuter= false;
@@ -357,7 +350,6 @@ ExecInitNestLoop(NestLoop *node, EState *estate, int eflags)
357350
/*
358351
* finally, wipe the current outer tuple clean.
359352
*/
360-
nlstate->js.ps.ps_OuterTupleSlot=NULL;
361353
nlstate->js.ps.ps_TupFromTlist= false;
362354
nlstate->nl_NeedNewOuter= true;
363355
nlstate->nl_MatchedOuter= false;
@@ -426,8 +418,6 @@ ExecReScanNestLoop(NestLoopState *node, ExprContext *exprCtxt)
426418
if (outerPlan->chgParam==NULL)
427419
ExecReScan(outerPlan,exprCtxt);
428420

429-
/* let outerPlan to free its result tuple ... */
430-
node->js.ps.ps_OuterTupleSlot=NULL;
431421
node->js.ps.ps_TupFromTlist= false;
432422
node->nl_NeedNewOuter= true;
433423
node->nl_MatchedOuter= false;

‎src/include/nodes/execnodes.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.190 2008/10/07 19:27:04 tgl Exp $
10+
* $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.191 2008/10/23 14:34:34 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -868,7 +868,7 @@ typedef struct PlanState
868868

869869
Plan*plan;/* associated Plan node */
870870

871-
EState*state;/* at execution time,state's of individual
871+
EState*state;/* at execution time,states of individual
872872
* nodes point to one EState for the whole
873873
* top-level plan */
874874

@@ -896,12 +896,11 @@ typedef struct PlanState
896896
/*
897897
* Other run-time state needed by most if not all node types.
898898
*/
899-
TupleTableSlot*ps_OuterTupleSlot;/* slot for current "outer" tuple */
900899
TupleTableSlot*ps_ResultTupleSlot;/* slot for my result tuples */
901900
ExprContext*ps_ExprContext;/* node's expression-evaluation context */
902901
ProjectionInfo*ps_ProjInfo;/* info for doing tuple projection */
903-
boolps_TupFromTlist;/* state flag for processing set-valued
904-
* functions in targetlist */
902+
boolps_TupFromTlist;/* state flag for processing set-valued
903+
* functions in targetlist */
905904
}PlanState;
906905

907906
/* ----------------

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp