Skip to content

Commit 421d7d8

Browse files
committed
Remove no-longer-needed ExecCountSlots infrastructure.
1 parent f92e8a4 commit 421d7d8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+56
-477
lines changed

src/backend/executor/execProcnode.c

Lines changed: 1 addition & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@
1212
*
1313
*
1414
* IDENTIFICATION
15-
* $PostgreSQL: pgsql/src/backend/executor/execProcnode.c,v 1.65 2009/01/01 17:23:41 momjian Exp $
15+
* $PostgreSQL: pgsql/src/backend/executor/execProcnode.c,v 1.66 2009/09/27 21:10:53 tgl Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
1919
/*
2020
* INTERFACE ROUTINES
21-
* ExecCountSlotsNode - count tuple slots needed by plan tree
2221
* ExecInitNode - initialize a plan node and its subplans
2322
* ExecProcNode - get a tuple by executing the plan node
2423
* ExecEndNode - shut down a plan node and its subplans
@@ -519,122 +518,6 @@ MultiExecProcNode(PlanState *node)
519518
}
520519

521520

522-
/*
523-
* ExecCountSlotsNode - count up the number of tuple table slots needed
524-
*
525-
* Note that this scans a Plan tree, not a PlanState tree, because we
526-
* haven't built the PlanState tree yet ...
527-
*/
528-
int
529-
ExecCountSlotsNode(Plan *node)
530-
{
531-
if (node == NULL)
532-
return 0;
533-
534-
switch (nodeTag(node))
535-
{
536-
/*
537-
* control nodes
538-
*/
539-
case T_Result:
540-
return ExecCountSlotsResult((Result *) node);
541-
542-
case T_Append:
543-
return ExecCountSlotsAppend((Append *) node);
544-
545-
case T_RecursiveUnion:
546-
return ExecCountSlotsRecursiveUnion((RecursiveUnion *) node);
547-
548-
case T_BitmapAnd:
549-
return ExecCountSlotsBitmapAnd((BitmapAnd *) node);
550-
551-
case T_BitmapOr:
552-
return ExecCountSlotsBitmapOr((BitmapOr *) node);
553-
554-
/*
555-
* scan nodes
556-
*/
557-
case T_SeqScan:
558-
return ExecCountSlotsSeqScan((SeqScan *) node);
559-
560-
case T_IndexScan:
561-
return ExecCountSlotsIndexScan((IndexScan *) node);
562-
563-
case T_BitmapIndexScan:
564-
return ExecCountSlotsBitmapIndexScan((BitmapIndexScan *) node);
565-
566-
case T_BitmapHeapScan:
567-
return ExecCountSlotsBitmapHeapScan((BitmapHeapScan *) node);
568-
569-
case T_TidScan:
570-
return ExecCountSlotsTidScan((TidScan *) node);
571-
572-
case T_SubqueryScan:
573-
return ExecCountSlotsSubqueryScan((SubqueryScan *) node);
574-
575-
case T_FunctionScan:
576-
return ExecCountSlotsFunctionScan((FunctionScan *) node);
577-
578-
case T_ValuesScan:
579-
return ExecCountSlotsValuesScan((ValuesScan *) node);
580-
581-
case T_CteScan:
582-
return ExecCountSlotsCteScan((CteScan *) node);
583-
584-
case T_WorkTableScan:
585-
return ExecCountSlotsWorkTableScan((WorkTableScan *) node);
586-
587-
/*
588-
* join nodes
589-
*/
590-
case T_NestLoop:
591-
return ExecCountSlotsNestLoop((NestLoop *) node);
592-
593-
case T_MergeJoin:
594-
return ExecCountSlotsMergeJoin((MergeJoin *) node);
595-
596-
case T_HashJoin:
597-
return ExecCountSlotsHashJoin((HashJoin *) node);
598-
599-
/*
600-
* materialization nodes
601-
*/
602-
case T_Material:
603-
return ExecCountSlotsMaterial((Material *) node);
604-
605-
case T_Sort:
606-
return ExecCountSlotsSort((Sort *) node);
607-
608-
case T_Group:
609-
return ExecCountSlotsGroup((Group *) node);
610-
611-
case T_Agg:
612-
return ExecCountSlotsAgg((Agg *) node);
613-
614-
case T_WindowAgg:
615-
return ExecCountSlotsWindowAgg((WindowAgg *) node);
616-
break;
617-
618-
case T_Unique:
619-
return ExecCountSlotsUnique((Unique *) node);
620-
621-
case T_Hash:
622-
return ExecCountSlotsHash((Hash *) node);
623-
624-
case T_SetOp:
625-
return ExecCountSlotsSetOp((SetOp *) node);
626-
627-
case T_Limit:
628-
return ExecCountSlotsLimit((Limit *) node);
629-
630-
default:
631-
elog(ERROR, "unrecognized node type: %d", (int) nodeTag(node));
632-
break;
633-
}
634-
635-
return 0;
636-
}
637-
638521
/* ----------------------------------------------------------------
639522
* ExecEndNode
640523
*

src/backend/executor/nodeAgg.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
* Portions Copyright (c) 1994, Regents of the University of California
6464
*
6565
* IDENTIFICATION
66-
* $PostgreSQL: pgsql/src/backend/executor/nodeAgg.c,v 1.168 2009/07/23 20:45:27 tgl Exp $
66+
* $PostgreSQL: pgsql/src/backend/executor/nodeAgg.c,v 1.169 2009/09/27 21:10:53 tgl Exp $
6767
*
6868
*-------------------------------------------------------------------------
6969
*/
@@ -1239,8 +1239,6 @@ ExecInitAgg(Agg *node, EState *estate, int eflags)
12391239
ALLOCSET_DEFAULT_INITSIZE,
12401240
ALLOCSET_DEFAULT_MAXSIZE);
12411241

1242-
#define AGG_NSLOTS 3
1243-
12441242
/*
12451243
* tuple table initialization
12461244
*/
@@ -1604,14 +1602,6 @@ GetAggInitVal(Datum textInitVal, Oid transtype)
16041602
return initVal;
16051603
}
16061604

1607-
int
1608-
ExecCountSlotsAgg(Agg *node)
1609-
{
1610-
return ExecCountSlotsNode(outerPlan(node)) +
1611-
ExecCountSlotsNode(innerPlan(node)) +
1612-
AGG_NSLOTS;
1613-
}
1614-
16151605
void
16161606
ExecEndAgg(AggState *node)
16171607
{

src/backend/executor/nodeAppend.c

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/executor/nodeAppend.c,v 1.74 2009/01/01 17:23:41 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/executor/nodeAppend.c,v 1.75 2009/09/27 21:10:53 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -192,8 +192,6 @@ ExecInitAppend(Append *node, EState *estate, int eflags)
192192
* ExecQual or ExecProject.
193193
*/
194194

195-
#define APPEND_NSLOTS 1
196-
197195
/*
198196
* append nodes still have Result slots, which hold pointers to tuples, so
199197
* we have to initialize them.
@@ -233,17 +231,6 @@ ExecInitAppend(Append *node, EState *estate, int eflags)
233231
return appendstate;
234232
}
235233

236-
int
237-
ExecCountSlotsAppend(Append *node)
238-
{
239-
ListCell *plan;
240-
int nSlots = 0;
241-
242-
foreach(plan, node->appendplans)
243-
nSlots += ExecCountSlotsNode((Plan *) lfirst(plan));
244-
return nSlots + APPEND_NSLOTS;
245-
}
246-
247234
/* ----------------------------------------------------------------
248235
* ExecAppend
249236
*

src/backend/executor/nodeBitmapAnd.c

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/executor/nodeBitmapAnd.c,v 1.11 2009/01/01 17:23:41 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/executor/nodeBitmapAnd.c,v 1.12 2009/09/27 21:10:53 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -74,8 +74,6 @@ ExecInitBitmapAnd(BitmapAnd *node, EState *estate, int eflags)
7474
* ExecQual or ExecProject. They don't need any tuple slots either.
7575
*/
7676

77-
#define BITMAPAND_NSLOTS 0
78-
7977
/*
8078
* call ExecInitNode on each of the plans to be executed and save the
8179
* results into the array "bitmapplanstates".
@@ -91,17 +89,6 @@ ExecInitBitmapAnd(BitmapAnd *node, EState *estate, int eflags)
9189
return bitmapandstate;
9290
}
9391

94-
int
95-
ExecCountSlotsBitmapAnd(BitmapAnd *node)
96-
{
97-
ListCell *plan;
98-
int nSlots = 0;
99-
100-
foreach(plan, node->bitmapplans)
101-
nSlots += ExecCountSlotsNode((Plan *) lfirst(plan));
102-
return nSlots + BITMAPAND_NSLOTS;
103-
}
104-
10592
/* ----------------------------------------------------------------
10693
* MultiExecBitmapAnd
10794
* ----------------------------------------------------------------

src/backend/executor/nodeBitmapHeapscan.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*
2222
*
2323
* IDENTIFICATION
24-
* $PostgreSQL: pgsql/src/backend/executor/nodeBitmapHeapscan.c,v 1.35 2009/06/11 14:48:57 momjian Exp $
24+
* $PostgreSQL: pgsql/src/backend/executor/nodeBitmapHeapscan.c,v 1.36 2009/09/27 21:10:53 tgl Exp $
2525
*
2626
*-------------------------------------------------------------------------
2727
*/
@@ -597,8 +597,6 @@ ExecInitBitmapHeapScan(BitmapHeapScan *node, EState *estate, int eflags)
597597
ExecInitExpr((Expr *) node->bitmapqualorig,
598598
(PlanState *) scanstate);
599599

600-
#define BITMAPHEAPSCAN_NSLOTS 2
601-
602600
/*
603601
* tuple table initialization
604602
*/
@@ -646,10 +644,3 @@ ExecInitBitmapHeapScan(BitmapHeapScan *node, EState *estate, int eflags)
646644
*/
647645
return scanstate;
648646
}
649-
650-
int
651-
ExecCountSlotsBitmapHeapScan(BitmapHeapScan *node)
652-
{
653-
return ExecCountSlotsNode(outerPlan((Plan *) node)) +
654-
ExecCountSlotsNode(innerPlan((Plan *) node)) + BITMAPHEAPSCAN_NSLOTS;
655-
}

src/backend/executor/nodeBitmapIndexscan.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/executor/nodeBitmapIndexscan.c,v 1.31 2009/07/18 19:15:41 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/executor/nodeBitmapIndexscan.c,v 1.32 2009/09/27 21:10:53 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -235,8 +235,6 @@ ExecInitBitmapIndexScan(BitmapIndexScan *node, EState *estate, int eflags)
235235
* sub-parts corresponding to runtime keys (see below).
236236
*/
237237

238-
#define BITMAPINDEXSCAN_NSLOTS 0
239-
240238
/*
241239
* We do not open or lock the base relation here. We assume that an
242240
* ancestor BitmapHeapScan node is holding AccessShareLock (or better) on
@@ -318,10 +316,3 @@ ExecInitBitmapIndexScan(BitmapIndexScan *node, EState *estate, int eflags)
318316
*/
319317
return indexstate;
320318
}
321-
322-
int
323-
ExecCountSlotsBitmapIndexScan(BitmapIndexScan *node)
324-
{
325-
return ExecCountSlotsNode(outerPlan((Plan *) node)) +
326-
ExecCountSlotsNode(innerPlan((Plan *) node)) + BITMAPINDEXSCAN_NSLOTS;
327-
}

src/backend/executor/nodeBitmapOr.c

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/executor/nodeBitmapOr.c,v 1.10 2009/01/01 17:23:41 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/executor/nodeBitmapOr.c,v 1.11 2009/09/27 21:10:53 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -75,8 +75,6 @@ ExecInitBitmapOr(BitmapOr *node, EState *estate, int eflags)
7575
* ExecQual or ExecProject. They don't need any tuple slots either.
7676
*/
7777

78-
#define BITMAPOR_NSLOTS 0
79-
8078
/*
8179
* call ExecInitNode on each of the plans to be executed and save the
8280
* results into the array "bitmapplanstates".
@@ -92,17 +90,6 @@ ExecInitBitmapOr(BitmapOr *node, EState *estate, int eflags)
9290
return bitmaporstate;
9391
}
9492

95-
int
96-
ExecCountSlotsBitmapOr(BitmapOr *node)
97-
{
98-
ListCell *plan;
99-
int nSlots = 0;
100-
101-
foreach(plan, node->bitmapplans)
102-
nSlots += ExecCountSlotsNode((Plan *) lfirst(plan));
103-
return nSlots + BITMAPOR_NSLOTS;
104-
}
105-
10693
/* ----------------------------------------------------------------
10794
* MultiExecBitmapOr
10895
* ----------------------------------------------------------------

src/backend/executor/nodeCtescan.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/nodeCtescan.c,v 1.5 2009/06/11 14:48:57 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/executor/nodeCtescan.c,v 1.6 2009/09/27 21:10:53 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -237,8 +237,6 @@ ExecInitCteScan(CteScan *node, EState *estate, int eflags)
237237
ExecInitExpr((Expr *) node->scan.plan.qual,
238238
(PlanState *) scanstate);
239239

240-
#define CTESCAN_NSLOTS 2
241-
242240
/*
243241
* tuple table initialization
244242
*/
@@ -263,14 +261,6 @@ ExecInitCteScan(CteScan *node, EState *estate, int eflags)
263261
return scanstate;
264262
}
265263

266-
int
267-
ExecCountSlotsCteScan(CteScan *node)
268-
{
269-
return ExecCountSlotsNode(outerPlan(node)) +
270-
ExecCountSlotsNode(innerPlan(node)) +
271-
CTESCAN_NSLOTS;
272-
}
273-
274264
/* ----------------------------------------------------------------
275265
* ExecEndCteScan
276266
*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy