pgsql: Clean up collation processing in prepunion.c. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Clean up collation processing in prepunion.c.
Date
Msg-id E1QBCIY-0002U9-CV@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Clean up collation processing in prepunion.c.

This area was a few bricks shy of a load, and badly under-commented too.
We have to ensure that the generated targetlist entries for a set-operation
node expose the correct collation for each entry, since higher-level
processing expects the tlist to reflect the true ordering of the plan's
output.

This hackery wouldn't be necessary if SortGroupClause carried collation
info ... but making it do so would inject more pain in the parser than
would be saved here.  Still, we might want to rethink that sometime.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/121f49a00e432ee9cfad7270d99504350cd1015f

Modified Files
--------------
src/backend/optimizer/prep/prepjointree.c |    2 +-
src/backend/optimizer/prep/prepunion.c    |  131 +++++++++++++++++++++--------
src/backend/optimizer/util/tlist.c        |   34 ++++++++
src/include/optimizer/tlist.h             |    1 +
4 files changed, 132 insertions(+), 36 deletions(-)


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: Set client encoding explicitly in plpython_unicode test
Next
From: Tom Lane
Date:
Subject: pgsql: Simplify reindex_relation's API.