1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-17 17:02:08 +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:
Tom Lane
2011-03-11 16:27:51 -05:00
parent 7a8f43968a
commit 8acdb8bf9c
22 changed files with 298 additions and 139 deletions

View File

@ -2467,7 +2467,7 @@ transformColumnType(CreateStmtContext *cxt, ColumnDef *column)
Oid collOid;
collOid = LookupCollation(cxt->pstate,
column->collClause->collnames,
column->collClause->collname,
column->collClause->location);
/* Complain if COLLATE is applied to an uncollatable type */
if (!OidIsValid(typtup->typcollation))