*/
 /*
  *      INTERFACE ROUTINES
- *             ExecCountSlotsNode -    count tuple slots needed by plan tree
  *             ExecInitNode    -               initialize a plan node and its subplans
  *             ExecProcNode    -               get a tuple by executing the plan node
  *             ExecEndNode             -               shut down a plan node and its subplans
 }
 
 
-/*
- * ExecCountSlotsNode - count up the number of tuple table slots needed
- *
- * Note that this scans a Plan tree, not a PlanState tree, because we
- * haven't built the PlanState tree yet ...
- */
-int
-ExecCountSlotsNode(Plan *node)
-{
-       if (node == NULL)
-               return 0;
-
-       switch (nodeTag(node))
-       {
-                       /*
-                        * control nodes
-                        */
-               case T_Result:
-                       return ExecCountSlotsResult((Result *) node);
-
-               case T_Append:
-                       return ExecCountSlotsAppend((Append *) node);
-
-               case T_RecursiveUnion:
-                       return ExecCountSlotsRecursiveUnion((RecursiveUnion *) node);
-
-               case T_BitmapAnd:
-                       return ExecCountSlotsBitmapAnd((BitmapAnd *) node);
-
-               case T_BitmapOr:
-                       return ExecCountSlotsBitmapOr((BitmapOr *) node);
-
-                       /*
-                        * scan nodes
-                        */
-               case T_SeqScan:
-                       return ExecCountSlotsSeqScan((SeqScan *) node);
-
-               case T_IndexScan:
-                       return ExecCountSlotsIndexScan((IndexScan *) node);
-
-               case T_BitmapIndexScan:
-                       return ExecCountSlotsBitmapIndexScan((BitmapIndexScan *) node);
-
-               case T_BitmapHeapScan:
-                       return ExecCountSlotsBitmapHeapScan((BitmapHeapScan *) node);
-
-               case T_TidScan:
-                       return ExecCountSlotsTidScan((TidScan *) node);
-
-               case T_SubqueryScan:
-                       return ExecCountSlotsSubqueryScan((SubqueryScan *) node);
-
-               case T_FunctionScan:
-                       return ExecCountSlotsFunctionScan((FunctionScan *) node);
-
-               case T_ValuesScan:
-                       return ExecCountSlotsValuesScan((ValuesScan *) node);
-
-               case T_CteScan:
-                       return ExecCountSlotsCteScan((CteScan *) node);
-
-               case T_WorkTableScan:
-                       return ExecCountSlotsWorkTableScan((WorkTableScan *) node);
-
-                       /*
-                        * join nodes
-                        */
-               case T_NestLoop:
-                       return ExecCountSlotsNestLoop((NestLoop *) node);
-
-               case T_MergeJoin:
-                       return ExecCountSlotsMergeJoin((MergeJoin *) node);
-
-               case T_HashJoin:
-                       return ExecCountSlotsHashJoin((HashJoin *) node);
-
-                       /*
-                        * materialization nodes
-                        */
-               case T_Material:
-                       return ExecCountSlotsMaterial((Material *) node);
-
-               case T_Sort:
-                       return ExecCountSlotsSort((Sort *) node);
-
-               case T_Group:
-                       return ExecCountSlotsGroup((Group *) node);
-
-               case T_Agg:
-                       return ExecCountSlotsAgg((Agg *) node);
-
-               case T_WindowAgg:
-                       return ExecCountSlotsWindowAgg((WindowAgg *) node);
-                       break;
-
-               case T_Unique:
-                       return ExecCountSlotsUnique((Unique *) node);
-
-               case T_Hash:
-                       return ExecCountSlotsHash((Hash *) node);
-
-               case T_SetOp:
-                       return ExecCountSlotsSetOp((SetOp *) node);
-
-               case T_Limit:
-                       return ExecCountSlotsLimit((Limit *) node);
-
-               default:
-                       elog(ERROR, "unrecognized node type: %d", (int) nodeTag(node));
-                       break;
-       }
-
-       return 0;
-}
-
 /* ----------------------------------------------------------------
  *             ExecEndNode
  *
 
                                                          ALLOCSET_DEFAULT_INITSIZE,
                                                          ALLOCSET_DEFAULT_MAXSIZE);
 
-#define AGG_NSLOTS 3
-
        /*
         * tuple table initialization
         */
        return initVal;
 }
 
-int
-ExecCountSlotsAgg(Agg *node)
-{
-       return ExecCountSlotsNode(outerPlan(node)) +
-               ExecCountSlotsNode(innerPlan(node)) +
-               AGG_NSLOTS;
-}
-
 void
 ExecEndAgg(AggState *node)
 {
 
         * ExecQual or ExecProject.
         */
 
-#define APPEND_NSLOTS 1
-
        /*
         * append nodes still have Result slots, which hold pointers to tuples, so
         * we have to initialize them.
        return appendstate;
 }
 
-int
-ExecCountSlotsAppend(Append *node)
-{
-       ListCell   *plan;
-       int                     nSlots = 0;
-
-       foreach(plan, node->appendplans)
-               nSlots += ExecCountSlotsNode((Plan *) lfirst(plan));
-       return nSlots + APPEND_NSLOTS;
-}
-
 /* ----------------------------------------------------------------
  *        ExecAppend
  *
 
         * ExecQual or ExecProject.  They don't need any tuple slots either.
         */
 
-#define BITMAPAND_NSLOTS 0
-
        /*
         * call ExecInitNode on each of the plans to be executed and save the
         * results into the array "bitmapplanstates".
        return bitmapandstate;
 }
 
-int
-ExecCountSlotsBitmapAnd(BitmapAnd *node)
-{
-       ListCell   *plan;
-       int                     nSlots = 0;
-
-       foreach(plan, node->bitmapplans)
-               nSlots += ExecCountSlotsNode((Plan *) lfirst(plan));
-       return nSlots + BITMAPAND_NSLOTS;
-}
-
 /* ----------------------------------------------------------------
  *        MultiExecBitmapAnd
  * ----------------------------------------------------------------
 
                ExecInitExpr((Expr *) node->bitmapqualorig,
                                         (PlanState *) scanstate);
 
-#define BITMAPHEAPSCAN_NSLOTS 2
-
        /*
         * tuple table initialization
         */
         */
        return scanstate;
 }
-
-int
-ExecCountSlotsBitmapHeapScan(BitmapHeapScan *node)
-{
-       return ExecCountSlotsNode(outerPlan((Plan *) node)) +
-               ExecCountSlotsNode(innerPlan((Plan *) node)) + BITMAPHEAPSCAN_NSLOTS;
-}
 
         * sub-parts corresponding to runtime keys (see below).
         */
 
-#define BITMAPINDEXSCAN_NSLOTS 0
-
        /*
         * We do not open or lock the base relation here.  We assume that an
         * ancestor BitmapHeapScan node is holding AccessShareLock (or better) on
         */
        return indexstate;
 }
-
-int
-ExecCountSlotsBitmapIndexScan(BitmapIndexScan *node)
-{
-       return ExecCountSlotsNode(outerPlan((Plan *) node)) +
-               ExecCountSlotsNode(innerPlan((Plan *) node)) + BITMAPINDEXSCAN_NSLOTS;
-}
 
         * ExecQual or ExecProject.  They don't need any tuple slots either.
         */
 
-#define BITMAPOR_NSLOTS 0
-
        /*
         * call ExecInitNode on each of the plans to be executed and save the
         * results into the array "bitmapplanstates".
        return bitmaporstate;
 }
 
-int
-ExecCountSlotsBitmapOr(BitmapOr *node)
-{
-       ListCell   *plan;
-       int                     nSlots = 0;
-
-       foreach(plan, node->bitmapplans)
-               nSlots += ExecCountSlotsNode((Plan *) lfirst(plan));
-       return nSlots + BITMAPOR_NSLOTS;
-}
-
 /* ----------------------------------------------------------------
  *        MultiExecBitmapOr
  * ----------------------------------------------------------------
 
                ExecInitExpr((Expr *) node->scan.plan.qual,
                                         (PlanState *) scanstate);
 
-#define CTESCAN_NSLOTS 2
-
        /*
         * tuple table initialization
         */
        return scanstate;
 }
 
-int
-ExecCountSlotsCteScan(CteScan *node)
-{
-       return ExecCountSlotsNode(outerPlan(node)) +
-               ExecCountSlotsNode(innerPlan(node)) +
-               CTESCAN_NSLOTS;
-}
-
 /* ----------------------------------------------------------------
  *             ExecEndCteScan
  *
 
         */
        ExecAssignExprContext(estate, &scanstate->ss.ps);
 
-#define FUNCTIONSCAN_NSLOTS 2
-
        /*
         * tuple table initialization
         */
        return scanstate;
 }
 
-int
-ExecCountSlotsFunctionScan(FunctionScan *node)
-{
-       return ExecCountSlotsNode(outerPlan(node)) +
-               ExecCountSlotsNode(innerPlan(node)) +
-               FUNCTIONSCAN_NSLOTS;
-}
-
 /* ----------------------------------------------------------------
  *             ExecEndFunctionScan
  *
 
         */
        ExecAssignExprContext(estate, &grpstate->ss.ps);
 
-#define GROUP_NSLOTS 2
-
        /*
         * tuple table initialization
         */
        return grpstate;
 }
 
-int
-ExecCountSlotsGroup(Group *node)
-{
-       return ExecCountSlotsNode(outerPlan(node)) + GROUP_NSLOTS;
-}
-
 /* ------------------------
  *             ExecEndGroup(node)
  *
 
         */
        ExecAssignExprContext(estate, &hashstate->ps);
 
-#define HASH_NSLOTS 1
-
        /*
         * initialize our result slot
         */
        return hashstate;
 }
 
-int
-ExecCountSlotsHash(Hash *node)
-{
-       return ExecCountSlotsNode(outerPlan(node)) +
-               ExecCountSlotsNode(innerPlan(node)) +
-               HASH_NSLOTS;
-}
-
 /* ---------------------------------------------------------------
  *             ExecEndHash
  *
 
        outerPlanState(hjstate) = ExecInitNode(outerNode, estate, eflags);
        innerPlanState(hjstate) = ExecInitNode((Plan *) hashNode, estate, eflags);
 
-#define HASHJOIN_NSLOTS 3
-
        /*
         * tuple table initialization
         */
        return hjstate;
 }
 
-int
-ExecCountSlotsHashJoin(HashJoin *node)
-{
-       return ExecCountSlotsNode(outerPlan(node)) +
-               ExecCountSlotsNode(innerPlan(node)) +
-               HASHJOIN_NSLOTS;
-}
-
 /* ----------------------------------------------------------------
  *             ExecEndHashJoin
  *
 
                ExecInitExpr((Expr *) node->indexqualorig,
                                         (PlanState *) indexstate);
 
-#define INDEXSCAN_NSLOTS 2
-
        /*
         * tuple table initialization
         */
        else if (n_array_keys != 0)
                elog(ERROR, "ScalarArrayOpExpr index qual found where not allowed");
 }
-
-int
-ExecCountSlotsIndexScan(IndexScan *node)
-{
-       return ExecCountSlotsNode(outerPlan((Plan *) node)) +
-               ExecCountSlotsNode(innerPlan((Plan *) node)) + INDEXSCAN_NSLOTS;
-}
 
        limitstate->limitCount = ExecInitExpr((Expr *) node->limitCount,
                                                                                  (PlanState *) limitstate);
 
-#define LIMIT_NSLOTS 1
-
        /*
         * Tuple table initialization (XXX not actually used...)
         */
        return limitstate;
 }
 
-int
-ExecCountSlotsLimit(Limit *node)
-{
-       return ExecCountSlotsNode(outerPlan(node)) +
-               ExecCountSlotsNode(innerPlan(node)) +
-               LIMIT_NSLOTS;
-}
-
 /* ----------------------------------------------------------------
  *             ExecEndLimit
  *
 
         * ExecQual or ExecProject.
         */
 
-#define MATERIAL_NSLOTS 2
-
        /*
         * tuple table initialization
         *
        return matstate;
 }
 
-int
-ExecCountSlotsMaterial(Material *node)
-{
-       return ExecCountSlotsNode(outerPlan((Plan *) node)) +
-               ExecCountSlotsNode(innerPlan((Plan *) node)) +
-               MATERIAL_NSLOTS;
-}
-
 /* ----------------------------------------------------------------
  *             ExecEndMaterial
  * ----------------------------------------------------------------
 
        else
                mergestate->mj_ExtraMarks = false;
 
-#define MERGEJOIN_NSLOTS 4
-
        /*
         * tuple table initialization
         */
        return mergestate;
 }
 
-int
-ExecCountSlotsMergeJoin(MergeJoin *node)
-{
-       return ExecCountSlotsNode(outerPlan((Plan *) node)) +
-               ExecCountSlotsNode(innerPlan((Plan *) node)) +
-               MERGEJOIN_NSLOTS;
-}
-
 /* ----------------------------------------------------------------
  *             ExecEndMergeJoin
  *
 
        innerPlanState(nlstate) = ExecInitNode(innerPlan(node), estate,
                                                                                   eflags | EXEC_FLAG_REWIND);
 
-#define NESTLOOP_NSLOTS 2
-
        /*
         * tuple table initialization
         */
        return nlstate;
 }
 
-int
-ExecCountSlotsNestLoop(NestLoop *node)
-{
-       return ExecCountSlotsNode(outerPlan(node)) +
-               ExecCountSlotsNode(innerPlan(node)) +
-               NESTLOOP_NSLOTS;
-}
-
 /* ----------------------------------------------------------------
  *             ExecEndNestLoop
  *
 
         */
        Assert(node->plan.qual == NIL);
 
-#define RECURSIVEUNION_NSLOTS 1
-
        /*
         * RecursiveUnion nodes still have Result slots, which hold pointers to
         * tuples, so we have to initialize them.
        return rustate;
 }
 
-int
-ExecCountSlotsRecursiveUnion(RecursiveUnion *node)
-{
-       return ExecCountSlotsNode(outerPlan(node)) +
-               ExecCountSlotsNode(innerPlan(node)) +
-               RECURSIVEUNION_NSLOTS;
-}
-
 /* ----------------------------------------------------------------
  *             ExecEndRecursiveUnionScan
  *
 
 
        resstate->ps.ps_TupFromTlist = false;
 
-#define RESULT_NSLOTS 1
-
        /*
         * tuple table initialization
         */
        return resstate;
 }
 
-int
-ExecCountSlotsResult(Result *node)
-{
-       return ExecCountSlotsNode(outerPlan(node)) + RESULT_NSLOTS;
-}
-
 /* ----------------------------------------------------------------
  *             ExecEndResult
  *
 
                ExecInitExpr((Expr *) node->plan.qual,
                                         (PlanState *) scanstate);
 
-#define SEQSCAN_NSLOTS 2
-
        /*
         * tuple table initialization
         */
        return scanstate;
 }
 
-int
-ExecCountSlotsSeqScan(SeqScan *node)
-{
-       return ExecCountSlotsNode(outerPlan(node)) +
-               ExecCountSlotsNode(innerPlan(node)) +
-               SEQSCAN_NSLOTS;
-}
-
 /* ----------------------------------------------------------------
  *             ExecEndSeqScan
  *
 
                                                                  ALLOCSET_DEFAULT_INITSIZE,
                                                                  ALLOCSET_DEFAULT_MAXSIZE);
 
-#define SETOP_NSLOTS 1
-
        /*
         * Tuple table initialization
         */
        return setopstate;
 }
 
-int
-ExecCountSlotsSetOp(SetOp *node)
-{
-       return ExecCountSlotsNode(outerPlan(node)) +
-               ExecCountSlotsNode(innerPlan(node)) +
-               SETOP_NSLOTS;
-}
-
 /* ----------------------------------------------------------------
  *             ExecEndSetOp
  *
 
         * ExecQual or ExecProject.
         */
 
-#define SORT_NSLOTS 2
-
        /*
         * tuple table initialization
         *
        return sortstate;
 }
 
-int
-ExecCountSlotsSort(Sort *node)
-{
-       return ExecCountSlotsNode(outerPlan((Plan *) node)) +
-               ExecCountSlotsNode(innerPlan((Plan *) node)) +
-               SORT_NSLOTS;
-}
-
 /* ----------------------------------------------------------------
  *             ExecEndSort(node)
  * ----------------------------------------------------------------
 
                ExecInitExpr((Expr *) node->scan.plan.qual,
                                         (PlanState *) subquerystate);
 
-#define SUBQUERYSCAN_NSLOTS 2
-
        /*
         * tuple table initialization
         */
        return subquerystate;
 }
 
-int
-ExecCountSlotsSubqueryScan(SubqueryScan *node)
-{
-       Assert(outerPlan(node) == NULL);
-       Assert(innerPlan(node) == NULL);
-       return ExecCountSlotsNode(node->subplan) +
-               SUBQUERYSCAN_NSLOTS;
-}
-
 /* ----------------------------------------------------------------
  *             ExecEndSubqueryScan
  *
 
                ExecInitExpr((Expr *) node->tidquals,
                                         (PlanState *) tidstate);
 
-#define TIDSCAN_NSLOTS 2
-
        /*
         * tuple table initialization
         */
         */
        return tidstate;
 }
-
-int
-ExecCountSlotsTidScan(TidScan *node)
-{
-       return ExecCountSlotsNode(outerPlan((Plan *) node)) +
-               ExecCountSlotsNode(innerPlan((Plan *) node)) + TIDSCAN_NSLOTS;
-}
 
                                                          ALLOCSET_DEFAULT_INITSIZE,
                                                          ALLOCSET_DEFAULT_MAXSIZE);
 
-#define UNIQUE_NSLOTS 1
-
        /*
         * Tuple table initialization
         */
        return uniquestate;
 }
 
-int
-ExecCountSlotsUnique(Unique *node)
-{
-       return ExecCountSlotsNode(outerPlan(node)) +
-               ExecCountSlotsNode(innerPlan(node)) +
-               UNIQUE_NSLOTS;
-}
-
 /* ----------------------------------------------------------------
  *             ExecEndUnique
  *
 
        scanstate->rowcontext = planstate->ps_ExprContext;
        ExecAssignExprContext(estate, planstate);
 
-#define VALUESSCAN_NSLOTS 2
-
        /*
         * tuple table initialization
         */
        return scanstate;
 }
 
-int
-ExecCountSlotsValuesScan(ValuesScan *node)
-{
-       return ExecCountSlotsNode(outerPlan(node)) +
-               ExecCountSlotsNode(innerPlan(node)) +
-               VALUESSCAN_NSLOTS;
-}
-
 /* ----------------------------------------------------------------
  *             ExecEndValuesScan
  *
 
                                                          ALLOCSET_DEFAULT_INITSIZE,
                                                          ALLOCSET_DEFAULT_MAXSIZE);
 
-#define WINDOWAGG_NSLOTS 6
-
        /*
         * tuple table initialization
         */
        return winstate;
 }
 
-/* -----------------
- * ExecCountSlotsWindowAgg
- * -----------------
- */
-int
-ExecCountSlotsWindowAgg(WindowAgg *node)
-{
-       return ExecCountSlotsNode(outerPlan(node)) +
-               ExecCountSlotsNode(innerPlan(node)) +
-               WINDOWAGG_NSLOTS;
-}
-
 /* -----------------
  * ExecEndWindowAgg
  * -----------------
 
                ExecInitExpr((Expr *) node->scan.plan.qual,
                                         (PlanState *) scanstate);
 
-#define WORKTABLESCAN_NSLOTS 2
-
        /*
         * tuple table initialization
         */
        return scanstate;
 }
 
-int
-ExecCountSlotsWorkTableScan(WorkTableScan *node)
-{
-       return ExecCountSlotsNode(outerPlan(node)) +
-               ExecCountSlotsNode(innerPlan(node)) +
-               WORKTABLESCAN_NSLOTS;
-}
-
 /* ----------------------------------------------------------------
  *             ExecEndWorkTableScan
  *
 
 extern PlanState *ExecInitNode(Plan *node, EState *estate, int eflags);
 extern TupleTableSlot *ExecProcNode(PlanState *node);
 extern Node *MultiExecProcNode(PlanState *node);
-extern int     ExecCountSlotsNode(Plan *node);
 extern void ExecEndNode(PlanState *node);
 
 /*
 
 
 #include "nodes/execnodes.h"
 
-extern int     ExecCountSlotsAgg(Agg *node);
 extern AggState *ExecInitAgg(Agg *node, EState *estate, int eflags);
 extern TupleTableSlot *ExecAgg(AggState *node);
 extern void ExecEndAgg(AggState *node);
 
 
 #include "nodes/execnodes.h"
 
-extern int     ExecCountSlotsAppend(Append *node);
 extern AppendState *ExecInitAppend(Append *node, EState *estate, int eflags);
 extern TupleTableSlot *ExecAppend(AppendState *node);
 extern void ExecEndAppend(AppendState *node);
 
 
 #include "nodes/execnodes.h"
 
-extern int     ExecCountSlotsBitmapAnd(BitmapAnd *node);
 extern BitmapAndState *ExecInitBitmapAnd(BitmapAnd *node, EState *estate, int eflags);
 extern Node *MultiExecBitmapAnd(BitmapAndState *node);
 extern void ExecEndBitmapAnd(BitmapAndState *node);
 
 
 #include "nodes/execnodes.h"
 
-extern int     ExecCountSlotsBitmapHeapScan(BitmapHeapScan *node);
 extern BitmapHeapScanState *ExecInitBitmapHeapScan(BitmapHeapScan *node, EState *estate, int eflags);
 extern TupleTableSlot *ExecBitmapHeapScan(BitmapHeapScanState *node);
 extern void ExecEndBitmapHeapScan(BitmapHeapScanState *node);
 
 
 #include "nodes/execnodes.h"
 
-extern int     ExecCountSlotsBitmapIndexScan(BitmapIndexScan *node);
 extern BitmapIndexScanState *ExecInitBitmapIndexScan(BitmapIndexScan *node, EState *estate, int eflags);
 extern Node *MultiExecBitmapIndexScan(BitmapIndexScanState *node);
 extern void ExecEndBitmapIndexScan(BitmapIndexScanState *node);
 
 
 #include "nodes/execnodes.h"
 
-extern int     ExecCountSlotsBitmapOr(BitmapOr *node);
 extern BitmapOrState *ExecInitBitmapOr(BitmapOr *node, EState *estate, int eflags);
 extern Node *MultiExecBitmapOr(BitmapOrState *node);
 extern void ExecEndBitmapOr(BitmapOrState *node);
 
 
 #include "nodes/execnodes.h"
 
-extern int     ExecCountSlotsCteScan(CteScan *node);
 extern CteScanState *ExecInitCteScan(CteScan *node, EState *estate, int eflags);
 extern TupleTableSlot *ExecCteScan(CteScanState *node);
 extern void ExecEndCteScan(CteScanState *node);
 
 
 #include "nodes/execnodes.h"
 
-extern int     ExecCountSlotsFunctionScan(FunctionScan *node);
 extern FunctionScanState *ExecInitFunctionScan(FunctionScan *node, EState *estate, int eflags);
 extern TupleTableSlot *ExecFunctionScan(FunctionScanState *node);
 extern void ExecEndFunctionScan(FunctionScanState *node);
 
 
 #include "nodes/execnodes.h"
 
-extern int     ExecCountSlotsGroup(Group *node);
 extern GroupState *ExecInitGroup(Group *node, EState *estate, int eflags);
 extern TupleTableSlot *ExecGroup(GroupState *node);
 extern void ExecEndGroup(GroupState *node);
 
 
 #include "nodes/execnodes.h"
 
-extern int     ExecCountSlotsHash(Hash *node);
 extern HashState *ExecInitHash(Hash *node, EState *estate, int eflags);
 extern TupleTableSlot *ExecHash(HashState *node);
 extern Node *MultiExecHash(HashState *node);
 
 #include "nodes/execnodes.h"
 #include "storage/buffile.h"
 
-extern int     ExecCountSlotsHashJoin(HashJoin *node);
 extern HashJoinState *ExecInitHashJoin(HashJoin *node, EState *estate, int eflags);
 extern TupleTableSlot *ExecHashJoin(HashJoinState *node);
 extern void ExecEndHashJoin(HashJoinState *node);
 
 
 #include "nodes/execnodes.h"
 
-extern int     ExecCountSlotsIndexScan(IndexScan *node);
 extern IndexScanState *ExecInitIndexScan(IndexScan *node, EState *estate, int eflags);
 extern TupleTableSlot *ExecIndexScan(IndexScanState *node);
 extern void ExecEndIndexScan(IndexScanState *node);
 
 
 #include "nodes/execnodes.h"
 
-extern int     ExecCountSlotsLimit(Limit *node);
 extern LimitState *ExecInitLimit(Limit *node, EState *estate, int eflags);
 extern TupleTableSlot *ExecLimit(LimitState *node);
 extern void ExecEndLimit(LimitState *node);
 
 
 #include "nodes/execnodes.h"
 
-extern int     ExecCountSlotsMaterial(Material *node);
 extern MaterialState *ExecInitMaterial(Material *node, EState *estate, int eflags);
 extern TupleTableSlot *ExecMaterial(MaterialState *node);
 extern void ExecEndMaterial(MaterialState *node);
 
 
 #include "nodes/execnodes.h"
 
-extern int     ExecCountSlotsMergeJoin(MergeJoin *node);
 extern MergeJoinState *ExecInitMergeJoin(MergeJoin *node, EState *estate, int eflags);
 extern TupleTableSlot *ExecMergeJoin(MergeJoinState *node);
 extern void ExecEndMergeJoin(MergeJoinState *node);
 
 
 #include "nodes/execnodes.h"
 
-extern int     ExecCountSlotsNestLoop(NestLoop *node);
 extern NestLoopState *ExecInitNestLoop(NestLoop *node, EState *estate, int eflags);
 extern TupleTableSlot *ExecNestLoop(NestLoopState *node);
 extern void ExecEndNestLoop(NestLoopState *node);
 
 
 #include "nodes/execnodes.h"
 
-extern int     ExecCountSlotsRecursiveUnion(RecursiveUnion *node);
 extern RecursiveUnionState *ExecInitRecursiveUnion(RecursiveUnion *node, EState *estate, int eflags);
 extern TupleTableSlot *ExecRecursiveUnion(RecursiveUnionState *node);
 extern void ExecEndRecursiveUnion(RecursiveUnionState *node);
 
 
 #include "nodes/execnodes.h"
 
-extern int     ExecCountSlotsResult(Result *node);
 extern ResultState *ExecInitResult(Result *node, EState *estate, int eflags);
 extern TupleTableSlot *ExecResult(ResultState *node);
 extern void ExecEndResult(ResultState *node);
 
 
 #include "nodes/execnodes.h"
 
-extern int     ExecCountSlotsSeqScan(SeqScan *node);
 extern SeqScanState *ExecInitSeqScan(SeqScan *node, EState *estate, int eflags);
 extern TupleTableSlot *ExecSeqScan(SeqScanState *node);
 extern void ExecEndSeqScan(SeqScanState *node);
 
 
 #include "nodes/execnodes.h"
 
-extern int     ExecCountSlotsSetOp(SetOp *node);
 extern SetOpState *ExecInitSetOp(SetOp *node, EState *estate, int eflags);
 extern TupleTableSlot *ExecSetOp(SetOpState *node);
 extern void ExecEndSetOp(SetOpState *node);
 
 
 #include "nodes/execnodes.h"
 
-extern int     ExecCountSlotsSort(Sort *node);
 extern SortState *ExecInitSort(Sort *node, EState *estate, int eflags);
 extern TupleTableSlot *ExecSort(SortState *node);
 extern void ExecEndSort(SortState *node);
 
 
 #include "nodes/execnodes.h"
 
-extern int     ExecCountSlotsSubqueryScan(SubqueryScan *node);
 extern SubqueryScanState *ExecInitSubqueryScan(SubqueryScan *node, EState *estate, int eflags);
 extern TupleTableSlot *ExecSubqueryScan(SubqueryScanState *node);
 extern void ExecEndSubqueryScan(SubqueryScanState *node);
 
 
 #include "nodes/execnodes.h"
 
-extern int     ExecCountSlotsTidScan(TidScan *node);
 extern TidScanState *ExecInitTidScan(TidScan *node, EState *estate, int eflags);
 extern TupleTableSlot *ExecTidScan(TidScanState *node);
 extern void ExecEndTidScan(TidScanState *node);
 
 
 #include "nodes/execnodes.h"
 
-extern int     ExecCountSlotsUnique(Unique *node);
 extern UniqueState *ExecInitUnique(Unique *node, EState *estate, int eflags);
 extern TupleTableSlot *ExecUnique(UniqueState *node);
 extern void ExecEndUnique(UniqueState *node);
 
 
 #include "nodes/execnodes.h"
 
-extern int     ExecCountSlotsValuesScan(ValuesScan *node);
 extern ValuesScanState *ExecInitValuesScan(ValuesScan *node, EState *estate, int eflags);
 extern TupleTableSlot *ExecValuesScan(ValuesScanState *node);
 extern void ExecEndValuesScan(ValuesScanState *node);
 
 
 #include "nodes/execnodes.h"
 
-extern int     ExecCountSlotsWindowAgg(WindowAgg *node);
 extern WindowAggState *ExecInitWindowAgg(WindowAgg *node, EState *estate, int eflags);
 extern TupleTableSlot *ExecWindowAgg(WindowAggState *node);
 extern void ExecEndWindowAgg(WindowAggState *node);
 
 
 #include "nodes/execnodes.h"
 
-extern int     ExecCountSlotsWorkTableScan(WorkTableScan *node);
 extern WorkTableScanState *ExecInitWorkTableScan(WorkTableScan *node, EState *estate, int eflags);
 extern TupleTableSlot *ExecWorkTableScan(WorkTableScanState *node);
 extern void ExecEndWorkTableScan(WorkTableScanState *node);