summaryrefslogtreecommitdiff
path: root/src/backend/executor/execAmi.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-02-09 00:30:41 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-02-09 00:30:41 +0000
commit145014f81151a12ac6a0f8e299899c4f60e0f8c1 (patch)
tree669a8cecd8e2f67fae0966134b91a28df1e2a6e7 /src/backend/executor/execAmi.c
parentc15a4c2aef3ca78a530778b735d43aa04d103ea6 (diff)
Make further use of new bitmapset code: executor's chgParam, extParam,
locParam lists can be converted to bitmapsets to speed updating. Also, replace 'locParam' with 'allParam', which contains all the paramIDs relevant to the node (i.e., the union of extParam and locParam); this saves a step during SetChangedParamList() without costing anything elsewhere.
Diffstat (limited to 'src/backend/executor/execAmi.c')
-rw-r--r--src/backend/executor/execAmi.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/backend/executor/execAmi.c b/src/backend/executor/execAmi.c
index c55e5ecd149..b22ad763498 100644
--- a/src/backend/executor/execAmi.c
+++ b/src/backend/executor/execAmi.c
@@ -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.68 2002/12/14 00:17:50 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execAmi.c,v 1.69 2003/02/09 00:30:39 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -55,7 +55,7 @@ ExecReScan(PlanState *node, ExprContext *exprCtxt)
InstrEndLoop(node->instrument);
/* If we have changed parameters, propagate that info */
- if (node->chgParam != NIL)
+ if (node->chgParam != NULL)
{
List *lst;
@@ -64,10 +64,10 @@ ExecReScan(PlanState *node, ExprContext *exprCtxt)
SubPlanState *sstate = (SubPlanState *) 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)
+ if (splan->plan->extParam != NULL) /* don't care about child
+ * local Params */
+ UpdateChangedParamSet(splan, node->chgParam);
+ if (splan->chgParam != NULL)
ExecReScanSetParamPlan(sstate, node);
}
foreach(lst, node->subPlan)
@@ -75,14 +75,14 @@ ExecReScan(PlanState *node, ExprContext *exprCtxt)
SubPlanState *sstate = (SubPlanState *) lfirst(lst);
PlanState *splan = sstate->planstate;
- if (splan->plan->extParam != NIL)
- SetChangedParamList(splan, node->chgParam);
+ if (splan->plan->extParam != NULL)
+ UpdateChangedParamSet(splan, node->chgParam);
}
/* Well. Now set chgParam for left/right trees. */
if (node->lefttree != NULL)
- SetChangedParamList(node->lefttree, node->chgParam);
+ UpdateChangedParamSet(node->lefttree, node->chgParam);
if (node->righttree != NULL)
- SetChangedParamList(node->righttree, node->chgParam);
+ UpdateChangedParamSet(node->righttree, node->chgParam);
}
switch (nodeTag(node))
@@ -165,10 +165,10 @@ ExecReScan(PlanState *node, ExprContext *exprCtxt)
return;
}
- if (node->chgParam != NIL)
+ if (node->chgParam != NULL)
{
- freeList(node->chgParam);
- node->chgParam = NIL;
+ bms_free(node->chgParam);
+ node->chgParam = NULL;
}
}