diff options
Diffstat (limited to 'src/backend/nodes/equalfuncs.c')
| -rw-r--r-- | src/backend/nodes/equalfuncs.c | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c index b85c410c25..701e6511e4 100644 --- a/src/backend/nodes/equalfuncs.c +++ b/src/backend/nodes/equalfuncs.c @@ -24,7 +24,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.70 2000/07/22 04:22:46 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.71 2000/08/08 15:41:24 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -154,7 +154,7 @@ _equalOper(Oper *a, Oper *b) return false; /* - * We do not examine opid, opsize, or op_fcache, since these are + * We do not examine opid or op_fcache, since these are * logically derived from opno, and they may not be set yet depending * on how far along the node is in the parse/plan pipeline. * @@ -195,8 +195,6 @@ _equalParam(Param *a, Param *b) return false; if (a->paramtype != b->paramtype) return false; - if (!equal(a->param_tlist, b->param_tlist)) - return false; switch (a->paramkind) { @@ -233,15 +231,7 @@ _equalFunc(Func *a, Func *b) return false; if (a->functype != b->functype) return false; - if (a->funcisindex != b->funcisindex) - return false; - if (a->funcsize != b->funcsize) - return false; - /* Note we do not look at func_fcache */ - if (!equal(a->func_tlist, b->func_tlist)) - return false; - if (!equal(a->func_planlist, b->func_planlist)) - return false; + /* Note we do not look at func_fcache; see notes for _equalOper */ return true; } @@ -282,6 +272,20 @@ _equalSubLink(SubLink *a, SubLink *b) } static bool +_equalFieldSelect(FieldSelect *a, FieldSelect *b) +{ + if (!equal(a->arg, b->arg)) + return false; + if (a->fieldnum != b->fieldnum) + return false; + if (a->resulttype != b->resulttype) + return false; + if (a->resulttypmod != b->resulttypmod) + return false; + return true; +} + +static bool _equalRelabelType(RelabelType *a, RelabelType *b) { if (!equal(a->arg, b->arg)) @@ -787,6 +791,9 @@ equal(void *a, void *b) case T_Iter: retval = _equalIter(a, b); break; + case T_FieldSelect: + retval = _equalFieldSelect(a, b); + break; case T_RelabelType: retval = _equalRelabelType(a, b); break; |
