Disallow partitionwise join when collations don't match If the collation of any join key column doesn’t match the collation of the corresponding partition key, partitionwise joins can yield incorrect results. For example, rows that would match under the join key collation might be located in different partitions due to the partitioning collation. In such cases, a partitionwise join would yield different results from a non-partitionwise join, so disallow it in such cases.
Reported-by: Tender Wang <[email protected]> Author: Jian He <[email protected]> Reviewed-by: Tender Wang <[email protected]> Reviewed-by: Junwang Zhao <[email protected]> Discussion: https://postgr.es/m/cahewxnno_hkiq6pqylyfuqdtwp7kkhzih1j7pqyz0nr+ps2...@mail.gmail.com Backpatch-through: 12 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/075acdd93388c080c0fb0aca5723144ad7a56dac Modified Files -------------- src/backend/optimizer/util/relnode.c | 28 ++- src/test/regress/expected/collate.icu.utf8.out | 234 +++++++++++++++++++++++++ src/test/regress/sql/collate.icu.utf8.sql | 64 +++++++ 3 files changed, 324 insertions(+), 2 deletions(-)
