pgsql: Fix handling of collations in multi-row VALUES constructs. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Fix handling of collations in multi-row VALUES constructs.
Date
Msg-id E1QBuBK-00072l-Ic@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: Only allow typed tables to hang off composite types, not e.g. ta
Next
From: itagaki@pgfoundry.org (User Itagaki)
Date:
Subject: textsearch-ja - textsearch_senna: Hotfix for expression indexes.