diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2011-03-11 16:27:51 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2011-03-11 16:28:18 -0500 |
commit | 8acdb8bf9cebc42cee5aa96a2d594756b44173c9 (patch) | |
tree | 3db28ae99dfb962e4ac5f2f338a15d2b5c7a476e /src/backend/nodes/equalfuncs.c | |
parent | 7a8f43968add3c69b79c49ef236d945e643dcb1e (diff) | |
download | postgresql-8acdb8bf9cebc42cee5aa96a2d594756b44173c9.tar.gz postgresql-8acdb8bf9cebc42cee5aa96a2d594756b44173c9.zip |
Split CollateClause into separate raw and analyzed node types.
CollateClause is now used only in raw grammar output, and CollateExpr after
parse analysis. This is for clarity and to avoid carrying collation names
in post-analysis parse trees: that's both wasteful and possibly misleading,
since the collation's name could be changed while the parsetree still
exists.
Also, clean up assorted infelicities and omissions in processing of the
node type.
Diffstat (limited to 'src/backend/nodes/equalfuncs.c')
-rw-r--r-- | src/backend/nodes/equalfuncs.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c index c8ee4744364..3726006f1d2 100644 --- a/src/backend/nodes/equalfuncs.c +++ b/src/backend/nodes/equalfuncs.c @@ -494,6 +494,16 @@ _equalConvertRowtypeExpr(ConvertRowtypeExpr *a, ConvertRowtypeExpr *b) } static bool +_equalCollateExpr(CollateExpr *a, CollateExpr *b) +{ + COMPARE_NODE_FIELD(arg); + COMPARE_SCALAR_FIELD(collOid); + COMPARE_LOCATION_FIELD(location); + + return true; +} + +static bool _equalCaseExpr(CaseExpr *a, CaseExpr *b) { COMPARE_SCALAR_FIELD(casetype); @@ -2149,8 +2159,7 @@ static bool _equalCollateClause(CollateClause *a, CollateClause *b) { COMPARE_NODE_FIELD(arg); - COMPARE_NODE_FIELD(collnames); - COMPARE_SCALAR_FIELD(collOid); + COMPARE_NODE_FIELD(collname); COMPARE_LOCATION_FIELD(location); return true; @@ -2583,6 +2592,9 @@ equal(void *a, void *b) case T_ConvertRowtypeExpr: retval = _equalConvertRowtypeExpr(a, b); break; + case T_CollateExpr: + retval = _equalCollateExpr(a, b); + break; case T_CaseExpr: retval = _equalCaseExpr(a, b); break; |