diff options
Diffstat (limited to 'src/backend/nodes/equalfuncs.c')
-rw-r--r-- | src/backend/nodes/equalfuncs.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c index 6099f42cca7..f47fbdd5a41 100644 --- a/src/backend/nodes/equalfuncs.c +++ b/src/backend/nodes/equalfuncs.c @@ -18,7 +18,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.232 2004/11/05 19:15:59 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.233 2004/12/11 23:26:33 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -381,6 +381,24 @@ _equalRelabelType(RelabelType *a, RelabelType *b) } static bool +_equalConvertRowtypeExpr(ConvertRowtypeExpr *a, ConvertRowtypeExpr *b) +{ + COMPARE_NODE_FIELD(arg); + COMPARE_SCALAR_FIELD(resulttype); + + /* + * Special-case COERCE_DONTCARE, so that planner can build coercion + * nodes that are equal() to both explicit and implicit coercions. + */ + if (a->convertformat != b->convertformat && + a->convertformat != COERCE_DONTCARE && + b->convertformat != COERCE_DONTCARE) + return false; + + return true; +} + +static bool _equalCaseExpr(CaseExpr *a, CaseExpr *b) { COMPARE_SCALAR_FIELD(casetype); @@ -1844,6 +1862,9 @@ equal(void *a, void *b) case T_RelabelType: retval = _equalRelabelType(a, b); break; + case T_ConvertRowtypeExpr: + retval = _equalConvertRowtypeExpr(a, b); + break; case T_CaseExpr: retval = _equalCaseExpr(a, b); break; |