]> granicus.if.org Git - postgresql/commit
Clean up collation processing in prepunion.c.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 16 Apr 2011 20:39:50 +0000 (16:39 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 16 Apr 2011 20:40:42 +0000 (16:40 -0400)
commit121f49a00e432ee9cfad7270d99504350cd1015f
tree6038e4ed0d9ea0d2ae020bb582e26a6da4f77632
parent5809a6458450a59f8c4a7a25beaefc81cff563d1
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.
src/backend/optimizer/prep/prepjointree.c
src/backend/optimizer/prep/prepunion.c
src/backend/optimizer/util/tlist.c
src/include/optimizer/tlist.h