mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Clean up a few failures to set collation fields in expression nodes.
I'm not sure these have any non-cosmetic implications, but I'm not sure they don't, either. In particular, ensure the CaseTestExpr generated by transformAssignmentIndirection to represent the base target column carries the correct collation, because parse_collate.c won't fix that. Tweak lsyscache.c API so that we can get the appropriate collation without an extra syscache lookup.
This commit is contained in:
@ -796,6 +796,7 @@ build_coercion_expression(Node *node,
|
||||
* one argument.
|
||||
*/
|
||||
acoerce->resulttypmod = (nargs >= 2) ? targetTypMod : -1;
|
||||
/* resultcollid will be set by parse_collate.c */
|
||||
acoerce->isExplicit = isExplicit;
|
||||
acoerce->coerceformat = cformat;
|
||||
acoerce->location = location;
|
||||
@ -811,6 +812,7 @@ build_coercion_expression(Node *node,
|
||||
|
||||
iocoerce->arg = (Expr *) node;
|
||||
iocoerce->resulttype = targetTypeId;
|
||||
/* resultcollid will be set by parse_collate.c */
|
||||
iocoerce->coerceformat = cformat;
|
||||
iocoerce->location = location;
|
||||
|
||||
|
Reference in New Issue
Block a user