1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-12 21:01:52 +03:00

Phase 3 of read-only-plans project: ExecInitExpr now builds expression

execution state trees, and ExecEvalExpr takes an expression state tree
not an expression plan tree.  The plan tree is now read-only as far as
the executor is concerned.  Next step is to begin actually exploiting
this property.
This commit is contained in:
Tom Lane
2002-12-13 19:46:01 +00:00
parent 77b7a740f9
commit 3a4f7dde16
49 changed files with 993 additions and 815 deletions

View File

@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Header: /cvsroot/pgsql/src/backend/executor/execAmi.c,v 1.66 2002/12/05 15:50:30 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execAmi.c,v 1.67 2002/12/13 19:45:52 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -61,17 +61,19 @@ ExecReScan(PlanState *node, ExprContext *exprCtxt)
foreach(lst, node->initPlan)
{
PlanState *splan = ((SubPlanState *) lfirst(lst))->planstate;
SubPlanExprState *sstate = (SubPlanExprState *) lfirst(lst);
PlanState *splan = sstate->planstate;
if (splan->plan->extParam != NIL) /* don't care about child
* locParam */
SetChangedParamList(splan, node->chgParam);
if (splan->chgParam != NIL)
ExecReScanSetParamPlan((SubPlanState *) lfirst(lst), node);
ExecReScanSetParamPlan(sstate, node);
}
foreach(lst, node->subPlan)
{
PlanState *splan = ((SubPlanState *) lfirst(lst))->planstate;
SubPlanExprState *sstate = (SubPlanExprState *) lfirst(lst);
PlanState *splan = sstate->planstate;
if (splan->plan->extParam != NIL)
SetChangedParamList(splan, node->chgParam);