1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-15 19:21:59 +03:00

Get rid of the separate EState for subplans, and just let them share the

parent query's EState.  Now that there's a single flat rangetable for both
the main plan and subplans, there's no need anymore for a separate EState,
and removing it allows cleaning up some crufty code in nodeSubplan.c and
nodeSubqueryscan.c.  Should be a tad faster too, although any difference
will probably be hard to measure.  This is the last bit of subsidiary
mop-up work from changing to a flat rangetable.
This commit is contained in:
Tom Lane
2007-02-27 01:11:26 +00:00
parent 4756ff3dca
commit c7ff7663e4
15 changed files with 258 additions and 358 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/optimizer/plan/planner.c,v 1.215 2007/02/22 22:00:24 tgl Exp $
* $PostgreSQL: pgsql/src/backend/optimizer/plan/planner.c,v 1.216 2007/02/27 01:11:25 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -103,6 +103,7 @@ planner(Query *parse, bool isCursor, int cursorOptions,
glob->paramlist = NIL;
glob->subplans = NIL;
glob->subrtables = NIL;
glob->rewindPlanIDs = NULL;
glob->finalrtable = NIL;
/* Determine what fraction of the plan is likely to be scanned */
@ -158,6 +159,7 @@ planner(Query *parse, bool isCursor, int cursorOptions,
result->resultRelations = root->resultRelations;
result->into = parse->into;
result->subplans = glob->subplans;
result->rewindPlanIDs = glob->rewindPlanIDs;
result->returningLists = root->returningLists;
result->rowMarks = parse->rowMarks;
result->nParamExec = list_length(glob->paramlist);