From: | Amit Langote <amitlan(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Disallow partitionwise join when collations don't match |
Date: | 2024-11-08 08:40:51 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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 <tndrwang(at)gmail(dot)com>
Author: Jian He <jian(dot)universality(at)gmail(dot)com>
Reviewed-by: Tender Wang <tndrwang(at)gmail(dot)com>
Reviewed-by: Junwang Zhao <zhjwpku(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAHewXNno_HKiQ6PqyLYfuqDtwp7KKHZiH1J7Pqyz0nr+PS2Dwg@mail.gmail.com
Backpatch-through: 12
Branch
------
REL_12_STABLE
Modified Files
--------------
src/backend/optimizer/path/joinrels.c | 4 +
src/test/regress/expected/collate.icu.utf8.out | 118 +++++++++++++++++++++++++
src/test/regress/sql/collate.icu.utf8.sql | 22 +++++
3 files changed, 144 insertions(+)
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Langote | 2024-11-08 08:41:05 | pgsql: Disallow partitionwise join when collations don't match |
Previous Message | Amit Langote | 2024-11-08 07:15:29 | pgsql: Disallow partitionwise grouping when collations don't match |