aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeFunctionscan.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-10-01 19:51:50 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-10-01 19:51:50 +0000
commitdad4cb6258382e99409c3e0673f1a5ec5b8bf03f (patch)
treefc13e11ae4ec12a824befec58c61fe8e5b398197 /src/backend/executor/nodeFunctionscan.c
parent233f135144ffc02512490eaffdb2575284a3af9d (diff)
downloadpostgresql-dad4cb6258382e99409c3e0673f1a5ec5b8bf03f.tar.gz
postgresql-dad4cb6258382e99409c3e0673f1a5ec5b8bf03f.zip
Improve tuplestore.c to support multiple concurrent read positions.
This facility replaces the former mark/restore support but is otherwise upward-compatible with previous uses. It's expected to be needed for single evaluation of CTEs and also for window functions, so I'm committing it separately instead of waiting for either one of those patches to be finished. Per discussion with Greg Stark and Hitoshi Harada. Note: I removed nodeFunctionscan's mark/restore support, instead of bothering to update it for this change, because it was dead code anyway.
Diffstat (limited to 'src/backend/executor/nodeFunctionscan.c')
-rw-r--r--src/backend/executor/nodeFunctionscan.c41
1 files changed, 4 insertions, 37 deletions
diff --git a/src/backend/executor/nodeFunctionscan.c b/src/backend/executor/nodeFunctionscan.c
index 6bbb5b139b6..6113a2c9067 100644
--- a/src/backend/executor/nodeFunctionscan.c
+++ b/src/backend/executor/nodeFunctionscan.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/executor/nodeFunctionscan.c,v 1.46 2008/02/29 02:49:39 neilc Exp $
+ * $PostgreSQL: pgsql/src/backend/executor/nodeFunctionscan.c,v 1.47 2008/10/01 19:51:49 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -131,6 +131,9 @@ ExecInitFunctionScan(FunctionScan *node, EState *estate, int eflags)
TypeFuncClass functypclass;
TupleDesc tupdesc = NULL;
+ /* check for unsupported flags */
+ Assert(!(eflags & EXEC_FLAG_MARK));
+
/*
* FunctionScan should not have any children.
*/
@@ -274,42 +277,6 @@ ExecEndFunctionScan(FunctionScanState *node)
}
/* ----------------------------------------------------------------
- * ExecFunctionMarkPos
- *
- * Calls tuplestore to save the current position in the stored file.
- * ----------------------------------------------------------------
- */
-void
-ExecFunctionMarkPos(FunctionScanState *node)
-{
- /*
- * if we haven't materialized yet, just return.
- */
- if (!node->tuplestorestate)
- return;
-
- tuplestore_markpos(node->tuplestorestate);
-}
-
-/* ----------------------------------------------------------------
- * ExecFunctionRestrPos
- *
- * Calls tuplestore to restore the last saved file position.
- * ----------------------------------------------------------------
- */
-void
-ExecFunctionRestrPos(FunctionScanState *node)
-{
- /*
- * if we haven't materialized yet, just return.
- */
- if (!node->tuplestorestate)
- return;
-
- tuplestore_restorepos(node->tuplestorestate);
-}
-
-/* ----------------------------------------------------------------
* ExecFunctionReScan
*
* Rescans the relation.