For partitionwise join, match on partcollation, not parttypcoll.
authorRobert Haas <rhaas@postgresql.org>
Wed, 28 Feb 2018 17:16:09 +0000 (12:16 -0500)
committerRobert Haas <rhaas@postgresql.org>
Wed, 28 Feb 2018 17:16:09 +0000 (12:16 -0500)
commit2af28e603319224e87fd35ab62f36ef6de45eaac
treee92ca99fdef719d885db4f51846531a6a42ab675
parent73797b7884ee1722127f27ecfcede99367139dc0
For partitionwise join, match on partcollation, not parttypcoll.

The previous code considered two tables to have the partition scheme
if the underlying columns had the same collation, but what we
actually need to compare is not the collations associated with the
column but the collation used for partitioning.  Fix that.

Robert Haas and Amit Langote

Discussion: http://postgr.es/m/0f95f924-0efa-4cf5-eb5f-9a3d1bc3c33d@lab.ntt.co.jp
src/backend/optimizer/util/plancat.c
src/include/nodes/relation.h