mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Clean up plantree representation of SubPlan-s --- SubLink does not appear
in the planned representation of a subplan at all any more, only SubPlan. This means subselect.c doesn't scribble on its input anymore, which seems like a good thing; and there are no longer three different possible interpretations of a SubLink. Simplify node naming and improve comments in primnodes.h. No change to stored rules, though.
This commit is contained in:
@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.85 2002/12/12 15:49:32 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.86 2002/12/14 00:17:55 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -219,7 +219,7 @@ set_plan_references(Plan *plan, List *rtable)
|
||||
* subplan references in this plan's tlist and quals. If we did the
|
||||
* reference-adjustments bottom-up, then we would fail to match this
|
||||
* plan's var nodes against the already-modified nodes of the
|
||||
* children. Fortunately, that consideration doesn't apply to SubPlanExpr
|
||||
* children. Fortunately, that consideration doesn't apply to SubPlan
|
||||
* nodes; else we'd need two passes over the expression trees.
|
||||
*/
|
||||
set_plan_references(plan->lefttree, rtable);
|
||||
@ -227,9 +227,9 @@ set_plan_references(Plan *plan, List *rtable)
|
||||
|
||||
foreach(pl, plan->initPlan)
|
||||
{
|
||||
SubPlanExpr *sp = (SubPlanExpr *) lfirst(pl);
|
||||
SubPlan *sp = (SubPlan *) lfirst(pl);
|
||||
|
||||
Assert(IsA(sp, SubPlanExpr));
|
||||
Assert(IsA(sp, SubPlan));
|
||||
set_plan_references(sp->plan, sp->rtable);
|
||||
}
|
||||
}
|
||||
@ -259,9 +259,9 @@ fix_expr_references_walker(Node *node, void *context)
|
||||
set_opfuncid((OpExpr *) node);
|
||||
else if (IsA(node, DistinctExpr))
|
||||
set_opfuncid((OpExpr *) node); /* rely on struct equivalence */
|
||||
else if (IsA(node, SubPlanExpr))
|
||||
else if (IsA(node, SubPlan))
|
||||
{
|
||||
SubPlanExpr *sp = (SubPlanExpr *) node;
|
||||
SubPlan *sp = (SubPlan *) node;
|
||||
|
||||
set_plan_references(sp->plan, sp->rtable);
|
||||
}
|
||||
|
Reference in New Issue
Block a user