mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +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:
@@ -18,7 +18,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.176 2002/12/12 20:35:12 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.177 2002/12/14 00:17:51 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -296,16 +296,17 @@ _equalSubLink(SubLink *a, SubLink *b)
|
||||
}
|
||||
|
||||
static bool
|
||||
_equalSubPlanExpr(SubPlanExpr *a, SubPlanExpr *b)
|
||||
_equalSubPlan(SubPlan *a, SubPlan *b)
|
||||
{
|
||||
COMPARE_SCALAR_FIELD(typeOid);
|
||||
COMPARE_SCALAR_FIELD(subLinkType);
|
||||
COMPARE_SCALAR_FIELD(useor);
|
||||
COMPARE_NODE_FIELD(oper);
|
||||
/* should compare plans, but have to settle for comparing plan IDs */
|
||||
COMPARE_SCALAR_FIELD(plan_id);
|
||||
COMPARE_NODE_FIELD(rtable);
|
||||
COMPARE_INTLIST_FIELD(setParam);
|
||||
COMPARE_INTLIST_FIELD(parParam);
|
||||
COMPARE_NODE_FIELD(args);
|
||||
COMPARE_NODE_FIELD(sublink);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1561,8 +1562,8 @@ equal(void *a, void *b)
|
||||
case T_SubLink:
|
||||
retval = _equalSubLink(a, b);
|
||||
break;
|
||||
case T_SubPlanExpr:
|
||||
retval = _equalSubPlanExpr(a, b);
|
||||
case T_SubPlan:
|
||||
retval = _equalSubPlan(a, b);
|
||||
break;
|
||||
case T_FieldSelect:
|
||||
retval = _equalFieldSelect(a, b);
|
||||
|
||||
Reference in New Issue
Block a user