Cause ExecCountSlots() accounting to bear some relationship to reality.

Rather surprising we hadn't seen bug reports about this ...
This commit is contained in:
Tom Lane 2001-05-27 20:42:20 +00:00
parent 2bc1c14ab0
commit a3855c5761
7 changed files with 15 additions and 15 deletions

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* *
* $Id: nodeHash.c,v 1.56 2001/03/22 06:16:12 momjian Exp $ * $Id: nodeHash.c,v 1.57 2001/05/27 20:42:18 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -140,6 +140,8 @@ ExecInitHash(Hash *node, EState *estate, Plan *parent)
*/ */
ExecAssignExprContext(estate, &hashstate->cstate); ExecAssignExprContext(estate, &hashstate->cstate);
#define HASH_NSLOTS 1
/* /*
* initialize our result slot * initialize our result slot
*/ */
@ -164,7 +166,6 @@ ExecInitHash(Hash *node, EState *estate, Plan *parent)
int int
ExecCountSlotsHash(Hash *node) ExecCountSlotsHash(Hash *node)
{ {
#define HASH_NSLOTS 1
return ExecCountSlotsNode(outerPlan(node)) + return ExecCountSlotsNode(outerPlan(node)) +
ExecCountSlotsNode(innerPlan(node)) + ExecCountSlotsNode(innerPlan(node)) +
HASH_NSLOTS; HASH_NSLOTS;

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.59 2001/03/22 06:16:13 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.60 2001/05/27 20:42:18 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -615,7 +615,7 @@ ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent)
*/ */
ExecAssignExprContext(estate, &scanstate->cstate); ExecAssignExprContext(estate, &scanstate->cstate);
#define INDEXSCAN_NSLOTS 3 #define INDEXSCAN_NSLOTS 2
/* /*
* tuple table initialization * tuple table initialization

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeMaterial.c,v 1.35 2001/03/22 06:16:13 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/nodeMaterial.c,v 1.36 2001/05/27 20:42:19 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -154,7 +154,7 @@ ExecInitMaterial(Material *node, EState *estate, Plan *parent)
* ExecQual or ExecProject. * ExecQual or ExecProject.
*/ */
#define MATERIAL_NSLOTS 1 #define MATERIAL_NSLOTS 2
/* /*
* tuple table initialization * tuple table initialization

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSeqscan.c,v 1.29 2001/03/22 06:16:13 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/nodeSeqscan.c,v 1.30 2001/05/27 20:42:19 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -217,7 +217,7 @@ ExecInitSeqScan(SeqScan *node, EState *estate, Plan *parent)
*/ */
ExecAssignExprContext(estate, &scanstate->cstate); ExecAssignExprContext(estate, &scanstate->cstate);
#define SEQSCAN_NSLOTS 3 #define SEQSCAN_NSLOTS 2
/* /*
* tuple table initialization * tuple table initialization

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSort.c,v 1.33 2001/05/07 00:43:18 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/nodeSort.c,v 1.34 2001/05/27 20:42:19 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -241,7 +241,7 @@ ExecInitSort(Sort *node, EState *estate, Plan *parent)
* ExecQual or ExecProject. * ExecQual or ExecProject.
*/ */
#define SORT_NSLOTS 1 #define SORT_NSLOTS 2
/* /*
* tuple table initialization * tuple table initialization

View File

@ -12,7 +12,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSubqueryscan.c,v 1.8 2001/05/15 16:11:58 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/nodeSubqueryscan.c,v 1.9 2001/05/27 20:42:20 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -134,7 +134,7 @@ ExecInitSubqueryScan(SubqueryScan *node, EState *estate, Plan *parent)
*/ */
ExecAssignExprContext(estate, &subquerystate->csstate.cstate); ExecAssignExprContext(estate, &subquerystate->csstate.cstate);
#define SUBQUERYSCAN_NSLOTS 2 #define SUBQUERYSCAN_NSLOTS 1
/* /*
* tuple table initialization * tuple table initialization
@ -177,7 +177,6 @@ ExecInitSubqueryScan(SubqueryScan *node, EState *estate, Plan *parent)
int int
ExecCountSlotsSubqueryScan(SubqueryScan *node) ExecCountSlotsSubqueryScan(SubqueryScan *node)
{ {
/* /*
* The subplan has its own tuple table and must not be counted here! * The subplan has its own tuple table and must not be counted here!
*/ */

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeTidscan.c,v 1.16 2001/03/22 06:16:13 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/nodeTidscan.c,v 1.17 2001/05/27 20:42:20 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -411,7 +411,7 @@ ExecInitTidScan(TidScan *node, EState *estate, Plan *parent)
*/ */
ExecAssignExprContext(estate, &scanstate->cstate); ExecAssignExprContext(estate, &scanstate->cstate);
#define TIDSCAN_NSLOTS 3 #define TIDSCAN_NSLOTS 2
/* /*
* tuple table initialization * tuple table initialization