Fix handling of collations in multi-row VALUES constructs.
Per spec we ought to apply select_common_collation() across the expressions
in each column of the VALUES table. The original coding was just taking
the first row and assuming it was representative.
This patch adds a field to struct RangeTblEntry to carry the resolved
collations, so initdb is forced for changes in stored rule representation.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/918854cc08868d569aad3bdf2529fc61c66ecde5
Modified Files
--------------
src/backend/catalog/dependency.c | 13 +++-
src/backend/nodes/copyfuncs.c | 1 +
src/backend/nodes/equalfuncs.c | 1 +
src/backend/nodes/outfuncs.c | 1 +
src/backend/nodes/readfuncs.c | 1 +
src/backend/optimizer/plan/setrefs.c | 1 +
src/backend/parser/analyze.c | 125 ++++++++++++++++++++++-----------
src/backend/parser/parse_relation.c | 24 +++++--
src/include/catalog/catversion.h | 2 +-
src/include/nodes/parsenodes.h | 3 +-
src/include/parser/parse_relation.h | 1 +
src/test/regress/expected/collate.out | 8 ++
src/test/regress/sql/collate.sql | 3 +
13 files changed, 131 insertions(+), 53 deletions(-)