mirror of
https://github.com/postgres/postgres.git
synced 2025-11-18 02:02:55 +03:00
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.
This commit is contained in:
@@ -653,18 +653,6 @@ typedef struct RelabelType
|
||||
int location; /* token location, or -1 if unknown */
|
||||
} RelabelType;
|
||||
|
||||
/*
|
||||
* CollateClause - COLLATE
|
||||
*/
|
||||
typedef struct CollateClause
|
||||
{
|
||||
Expr xpr;
|
||||
Expr *arg; /* original expression */
|
||||
List *collnames; /* assigned collation */
|
||||
Oid collOid; /* resolved collation OID */
|
||||
int location; /* token location, or -1 if unknown */
|
||||
} CollateClause;
|
||||
|
||||
/* ----------------
|
||||
* CoerceViaIO
|
||||
*
|
||||
@@ -730,6 +718,18 @@ typedef struct ConvertRowtypeExpr
|
||||
int location; /* token location, or -1 if unknown */
|
||||
} ConvertRowtypeExpr;
|
||||
|
||||
/*----------
|
||||
* CollateExpr - COLLATE
|
||||
*----------
|
||||
*/
|
||||
typedef struct CollateExpr
|
||||
{
|
||||
Expr xpr;
|
||||
Expr *arg; /* input expression */
|
||||
Oid collOid; /* collation's OID */
|
||||
int location; /* token location, or -1 if unknown */
|
||||
} CollateExpr;
|
||||
|
||||
/*----------
|
||||
* CaseExpr - a CASE expression
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user