From aa60eecc37c1bbb934079bf5234fba3e3879873d Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 9 Mar 2003 02:19:13 +0000 Subject: Revise tuplestore and nodeMaterial so that we don't have to read the entire contents of the subplan into the tuplestore before we can return any tuples. Instead, the tuplestore holds what we've already read, and we fetch additional rows from the subplan as needed. Random access to the previously-read rows works with the tuplestore, and doesn't affect the state of the partially-read subplan. This is a step towards fixing the problems with cursors over complex queries --- we don't want to stick in Materialize nodes if they'll prevent quick startup for a cursor. --- src/backend/executor/execQual.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/backend/executor/execQual.c') diff --git a/src/backend/executor/execQual.c b/src/backend/executor/execQual.c index 968617c39a9..a1c1fdd8ad3 100644 --- a/src/backend/executor/execQual.c +++ b/src/backend/executor/execQual.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.125 2003/02/16 02:30:37 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.126 2003/03/09 02:19:13 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1107,13 +1107,6 @@ ExecMakeTableFunctionResult(ExprState *funcexpr, first_time = false; } - /* If we have a locally-created tupstore, close it up */ - if (tupstore) - { - MemoryContextSwitchTo(econtext->ecxt_per_query_memory); - tuplestore_donestoring(tupstore); - } - MemoryContextSwitchTo(callerContext); /* The returned pointers are those in rsinfo */ -- cgit v1.2.3