mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +03:00
Phase 1 of read-only-plans project: cause executor state nodes to point
to plan nodes, not vice-versa. All executor state nodes now inherit from struct PlanState. Copying of plan trees has been simplified by not storing a list of SubPlans in Plan nodes (eliminating duplicate links). The executor still needs such a list, but it can build it during ExecutorStart since it has to scan the plan tree anyway. No initdb forced since no stored-on-disk structures changed, but you will need a full recompile because of node-numbering changes.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.49 2002/06/20 20:29:40 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.50 2002/12/05 15:50:35 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -149,26 +149,15 @@ GetPortalByName(char *name)
|
||||
/*
|
||||
* PortalSetQuery
|
||||
* Attaches a "query" to portal.
|
||||
*
|
||||
* Exceptions:
|
||||
* BadState if called when disabled.
|
||||
* BadArg if portal is invalid.
|
||||
* BadArg if queryDesc is "invalid."
|
||||
* BadArg if state is "invalid."
|
||||
*/
|
||||
void
|
||||
PortalSetQuery(Portal portal,
|
||||
QueryDesc *queryDesc,
|
||||
TupleDesc attinfo,
|
||||
EState *state,
|
||||
void (*cleanup) (Portal portal))
|
||||
{
|
||||
AssertArg(PortalIsValid(portal));
|
||||
AssertArg(IsA((Node *) state, EState));
|
||||
|
||||
portal->queryDesc = queryDesc;
|
||||
portal->attinfo = attinfo;
|
||||
portal->state = state;
|
||||
portal->atStart = true; /* Allow fetch forward only */
|
||||
portal->atEnd = false;
|
||||
portal->cleanup = cleanup;
|
||||
@@ -212,8 +201,6 @@ CreatePortal(char *name)
|
||||
|
||||
/* initialize portal query */
|
||||
portal->queryDesc = NULL;
|
||||
portal->attinfo = NULL;
|
||||
portal->state = NULL;
|
||||
portal->atStart = true; /* disallow fetches until query is set */
|
||||
portal->atEnd = true;
|
||||
portal->cleanup = NULL;
|
||||
|
||||
Reference in New Issue
Block a user