Clean up a few failures to set collation fields in expression nodes.
Tom Lane <tgl@sss.pgh.pa.us>
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.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/optimizer/path/pathkeys.c | modified | +1 −2 |
| src/backend/optimizer/plan/createplan.c | modified | +2 −0 |
| src/backend/optimizer/util/clauses.c | modified | +1 −1 |
| src/backend/optimizer/util/predtest.c | modified | +4 −0 |
| src/backend/parser/parse_coerce.c | modified | +2 −0 |
| src/backend/parser/parse_target.c | modified | +27 −4 |
| src/backend/utils/adt/ruleutils.c | modified | +4 −2 |
| src/backend/utils/cache/lsyscache.c | modified | +6 −32 |
| src/include/utils/lsyscache.h | modified | +2 −3 |