aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1998-07-16 01:49:19 +0000
committerBruce Momjian <bruce@momjian.us>1998-07-16 01:49:19 +0000
commit4f807be2ad68566f02db9ac6294bf12151e44e1d (patch)
tree0ed8cec521600a225fd4d8f78ab4ce16785ad82e /src
parentc1f1a2e03a78d52dc8e177d15e5822a0e8fbea4a (diff)
downloadpostgresql-4f807be2ad68566f02db9ac6294bf12151e44e1d.tar.gz
postgresql-4f807be2ad68566f02db9ac6294bf12151e44e1d.zip
Patch for ReScan of Group.
Diffstat (limited to 'src')
-rw-r--r--src/backend/executor/execAmi.c8
-rw-r--r--src/backend/executor/nodeGroup.c11
-rw-r--r--src/include/executor/nodeGroup.h3
3 files changed, 19 insertions, 3 deletions
diff --git a/src/backend/executor/execAmi.c b/src/backend/executor/execAmi.c
index 6fa29ac6ec9..2c99433c85c 100644
--- a/src/backend/executor/execAmi.c
+++ b/src/backend/executor/execAmi.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execAmi.c,v 1.22 1998/07/15 22:16:17 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execAmi.c,v 1.23 1998/07/16 01:49:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -42,9 +42,11 @@
#include "executor/nodeHashjoin.h"
#include "executor/nodeHash.h"
#include "executor/nodeAgg.h"
+#include "executor/nodeGroup.h"
#include "executor/nodeResult.h"
#include "executor/nodeUnique.h"
#include "executor/nodeMergejoin.h"
+#include "executor/nodeAppend.h"
#include "executor/nodeSubplan.h"
#include "executor/execdebug.h"
#include "optimizer/internal.h" /* for _TEMP_RELATION_ID_ */
@@ -353,6 +355,10 @@ ExecReScan(Plan *node, ExprContext *exprCtxt, Plan *parent)
ExecReScanAgg((Agg *) node, exprCtxt, parent);
break;
+ case T_Group:
+ ExecReScanGroup((Group *) node, exprCtxt, parent);
+ break;
+
case T_Result:
ExecReScanResult((Result *) node, exprCtxt, parent);
break;
diff --git a/src/backend/executor/nodeGroup.c b/src/backend/executor/nodeGroup.c
index 4ba1aeaa76b..8ea2174d883 100644
--- a/src/backend/executor/nodeGroup.c
+++ b/src/backend/executor/nodeGroup.c
@@ -13,7 +13,7 @@
* columns. (ie. tuples from the same group are consecutive)
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeGroup.c,v 1.19 1998/06/15 19:28:21 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeGroup.c,v 1.20 1998/07/16 01:49:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -417,3 +417,12 @@ sameGroup(HeapTuple oldtuple,
return TRUE;
}
+
+void
+ExecReScanGroup(Group *node, ExprContext *exprCtxt, Plan *parent)
+{
+ GroupState *grpstate = node->grpstate;
+
+ grpstate->grp_useFirstTuple = FALSE;
+ grpstate->grp_done = FALSE;
+}
diff --git a/src/include/executor/nodeGroup.h b/src/include/executor/nodeGroup.h
index 97ded95c947..4449a09b4ac 100644
--- a/src/include/executor/nodeGroup.h
+++ b/src/include/executor/nodeGroup.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeGroup.h,v 1.5 1997/11/26 01:12:46 momjian Exp $
+ * $Id: nodeGroup.h,v 1.6 1998/07/16 01:49:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -21,5 +21,6 @@ extern TupleTableSlot *ExecGroup(Group *node);
extern bool ExecInitGroup(Group *node, EState *estate, Plan *parent);
extern int ExecCountSlotsGroup(Group *node);
extern void ExecEndGroup(Group *node);
+extern void ExecReScanGroup(Group *node, ExprContext *exprCtxt, Plan *parent);
#endif /* NODEGROUP_H */