diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2011-03-26 14:25:48 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2011-03-26 14:25:48 -0400 |
commit | b23c9fa9293c54a3829093d207be37a7b42cb630 (patch) | |
tree | 4bc1df3cf95ef9b75c9ac1f85ad57eed32db4889 /src/backend/utils/adt/ruleutils.c | |
parent | 92f4786fa9b730fd12cbfe973eb96addc6e98924 (diff) | |
download | postgresql-b23c9fa9293c54a3829093d207be37a7b42cb630.tar.gz postgresql-b23c9fa9293c54a3829093d207be37a7b42cb630.zip |
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.
Diffstat (limited to 'src/backend/utils/adt/ruleutils.c')
-rw-r--r-- | src/backend/utils/adt/ruleutils.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c index 621f1eb24ae..326079a75ba 100644 --- a/src/backend/utils/adt/ruleutils.c +++ b/src/backend/utils/adt/ruleutils.c @@ -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 { |