mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +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:
@ -912,12 +912,14 @@ pg_get_indexdef_worker(Oid indexrelid, int colno,
|
||||
{
|
||||
/* Simple index column */
|
||||
char *attname;
|
||||
int32 keycoltypmod;
|
||||
|
||||
attname = get_relid_attribute_name(indrelid, attnum);
|
||||
if (!colno || colno == keyno + 1)
|
||||
appendStringInfoString(&buf, quote_identifier(attname));
|
||||
keycoltype = get_atttype(indrelid, attnum);
|
||||
keycolcollation = get_attcollation(indrelid, attnum);
|
||||
get_atttypetypmodcoll(indrelid, attnum,
|
||||
&keycoltype, &keycoltypmod,
|
||||
&keycolcollation);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user