Adjust collation determination rules as per discussion.
Tom Lane <tgl@sss.pgh.pa.us>
Adjust collation determination rules as per discussion. Remove crude hack that tried to propagate collation through a function-returning-record, ie, from the function's arguments to individual fields selected from its result record. That is just plain inconsistent, because the function result is composite and cannot have a collation; and there's no hope of making this kind of action-at-a-distance work consistently. Adjust regression test cases that expected this to happen. Meanwhile, the behavior of casting to a domain with a declared collation stays the same as it was, since that seemed to be the consensus.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/parser/parse_collate.c | modified | +5 −22 |
| src/backend/parser/parse_func.c | modified | +1 −1 |
| src/backend/parser/parse_target.c | modified | +1 −1 |
| src/test/regress/expected/collate.linux.utf8.out | modified | +27 −27 |
| src/test/regress/expected/collate.out | modified | +16 −16 |
| src/test/regress/sql/collate.linux.utf8.sql | modified | +5 −5 |
| src/test/regress/sql/collate.sql | modified | +4 −4 |