OSDN Git Service

Adjust collation determination rules as per discussion.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 9 Apr 2011 18:40:09 +0000 (14:40 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 9 Apr 2011 18:40:09 +0000 (14:40 -0400)
commita19002d4e5da028ff7280554b281e402c609898b
treeac25f9dab75856d24d88a3a2bfac5faf34c25fba
parent7c76906b7e24d9ea94a2b0e33396ebcac600437d
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.
src/backend/parser/parse_collate.c
src/backend/parser/parse_func.c
src/backend/parser/parse_target.c
src/test/regress/expected/collate.linux.utf8.out
src/test/regress/expected/collate.out
src/test/regress/sql/collate.linux.utf8.sql
src/test/regress/sql/collate.sql