From 145014f81151a12ac6a0f8e299899c4f60e0f8c1 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 9 Feb 2003 00:30:41 +0000 Subject: 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. --- src/backend/executor/execAmi.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/backend/executor/execAmi.c') 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; } } -- cgit v1.2.3