aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/execProcnode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/executor/execProcnode.c')
-rw-r--r--src/backend/executor/execProcnode.c46
1 files changed, 45 insertions, 1 deletions
diff --git a/src/backend/executor/execProcnode.c b/src/backend/executor/execProcnode.c
index ff8caf16f01..555668e7799 100644
--- a/src/backend/executor/execProcnode.c
+++ b/src/backend/executor/execProcnode.c
@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/executor/execProcnode.c,v 1.48 2005/04/06 20:13:49 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/executor/execProcnode.c,v 1.49 2005/04/16 20:07:35 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -375,6 +375,50 @@ ExecProcNode(PlanState *node)
return result;
}
+
+/* ----------------------------------------------------------------
+ * MultiExecProcNode
+ *
+ * Execute a node that doesn't return individual tuples
+ * (it might return a hashtable, bitmap, etc). Caller should
+ * check it got back the expected kind of Node.
+ *
+ * This has essentially the same responsibilities as ExecProcNode,
+ * but it does not do InstrStartNode/InstrStopNode (mainly because
+ * it can't tell how many returned tuples to count). Each per-node
+ * function must provide its own instrumentation support.
+ * ----------------------------------------------------------------
+ */
+Node *
+MultiExecProcNode(PlanState *node)
+{
+ Node *result;
+
+ CHECK_FOR_INTERRUPTS();
+
+ if (node->chgParam != NULL) /* something changed */
+ ExecReScan(node, NULL); /* let ReScan handle this */
+
+ switch (nodeTag(node))
+ {
+ /*
+ * Only node types that actually support multiexec will be listed
+ */
+
+ case T_HashState:
+ result = MultiExecHash((HashState *) node);
+ break;
+
+ default:
+ elog(ERROR, "unrecognized node type: %d", (int) nodeTag(node));
+ result = NULL;
+ break;
+ }
+
+ return result;
+}
+
+
/*
* ExecCountSlotsNode - count up the number of tuple table slots needed
*