pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Disallow partitionwise join when collations don't match
7+ messages / 1 participants
[nested] [flat]

* pgsql: Disallow partitionwise join when collations don't match
@ 2024-11-08 08:40  Amit Langote <amitlan@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Amit Langote @ 2024-11-08 08:40 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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@gmail.com>
Author: Jian He <jian.universality@gmail.com>
Reviewed-by: Tender Wang <tndrwang@gmail.com>
Reviewed-by: Junwang Zhao <zhjwpku@gmail.com>
Discussion: https://postgr.es/m/CAHewXNno_HKiQ6PqyLYfuqDtwp7KKHZiH1J7Pqyz0nr+PS2Dwg@mail.gmail.com
Backpatch-through: 12

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/9c4757491683a10f0531bd206850d15dad8cadeb

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(+)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Disallow partitionwise join when collations don't match
@ 2024-11-08 08:41  Amit Langote <amitlan@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Amit Langote @ 2024-11-08 08:41 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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@gmail.com>
Author: Jian He <jian.universality@gmail.com>
Reviewed-by: Tender Wang <tndrwang@gmail.com>
Reviewed-by: Junwang Zhao <zhjwpku@gmail.com>
Discussion: https://postgr.es/m/CAHewXNno_HKiQ6PqyLYfuqDtwp7KKHZiH1J7Pqyz0nr+PS2Dwg@mail.gmail.com
Backpatch-through: 12

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/054701a2b77a2d99d1d2c73bfdc970319c592d16

Modified Files
--------------
src/backend/optimizer/util/relnode.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(+)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Disallow partitionwise join when collations don't match
@ 2024-11-08 08:41  Amit Langote <amitlan@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Amit Langote @ 2024-11-08 08:41 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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@gmail.com>
Author: Jian He <jian.universality@gmail.com>
Reviewed-by: Tender Wang <tndrwang@gmail.com>
Reviewed-by: Junwang Zhao <zhjwpku@gmail.com>
Discussion: https://postgr.es/m/CAHewXNno_HKiQ6PqyLYfuqDtwp7KKHZiH1J7Pqyz0nr+PS2Dwg@mail.gmail.com
Backpatch-through: 12

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/62df5484f976b76c95cbb00ae797e90de1b81f99

Modified Files
--------------
src/backend/optimizer/util/relnode.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(+)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Disallow partitionwise join when collations don't match
@ 2024-11-08 08:41  Amit Langote <amitlan@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Amit Langote @ 2024-11-08 08:41 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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@gmail.com>
Author: Jian He <jian.universality@gmail.com>
Reviewed-by: Tender Wang <tndrwang@gmail.com>
Reviewed-by: Junwang Zhao <zhjwpku@gmail.com>
Discussion: https://postgr.es/m/CAHewXNno_HKiQ6PqyLYfuqDtwp7KKHZiH1J7Pqyz0nr+PS2Dwg@mail.gmail.com
Backpatch-through: 12

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/33040b1715c7a3450a6b3dc61bd7779a5f9ae709

Modified Files
--------------
src/backend/optimizer/util/relnode.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(+)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Disallow partitionwise join when collations don't match
@ 2024-11-08 08:41  Amit Langote <amitlan@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Amit Langote @ 2024-11-08 08:41 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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@gmail.com>
Author: Jian He <jian.universality@gmail.com>
Reviewed-by: Tender Wang <tndrwang@gmail.com>
Reviewed-by: Junwang Zhao <zhjwpku@gmail.com>
Discussion: https://postgr.es/m/CAHewXNno_HKiQ6PqyLYfuqDtwp7KKHZiH1J7Pqyz0nr+PS2Dwg@mail.gmail.com
Backpatch-through: 12

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f734b6b4d0cc6194cb93d74f179c8471306ea3b9

Modified Files
--------------
src/backend/optimizer/util/relnode.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(+)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Disallow partitionwise join when collations don't match
@ 2024-11-08 08:41  Amit Langote <amitlan@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Amit Langote @ 2024-11-08 08:41 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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@gmail.com>
Author: Jian He <jian.universality@gmail.com>
Reviewed-by: Tender Wang <tndrwang@gmail.com>
Reviewed-by: Junwang Zhao <zhjwpku@gmail.com>
Discussion: https://postgr.es/m/CAHewXNno_HKiQ6PqyLYfuqDtwp7KKHZiH1J7Pqyz0nr+PS2Dwg@mail.gmail.com
Backpatch-through: 12

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/a0cdfc8893673d1325f077b79f551aa105f360b8

Modified Files
--------------
src/backend/optimizer/util/relnode.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(+)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Disallow partitionwise join when collations don't match
@ 2024-11-08 08:42  Amit Langote <amitlan@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Amit Langote @ 2024-11-08 08:42 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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@gmail.com>
Author: Jian He <jian.universality@gmail.com>
Reviewed-by: Tender Wang <tndrwang@gmail.com>
Reviewed-by: Junwang Zhao <zhjwpku@gmail.com>
Discussion: https://postgr.es/m/CAHewXNno_HKiQ6PqyLYfuqDtwp7KKHZiH1J7Pqyz0nr+PS2Dwg@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(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2024-11-08 08:42 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-11-08 08:40 pgsql: Disallow partitionwise join when collations don't match Amit Langote <amitlan@postgresql.org>
2024-11-08 08:41 pgsql: Disallow partitionwise join when collations don't match Amit Langote <amitlan@postgresql.org>
2024-11-08 08:41 pgsql: Disallow partitionwise join when collations don't match Amit Langote <amitlan@postgresql.org>
2024-11-08 08:41 pgsql: Disallow partitionwise join when collations don't match Amit Langote <amitlan@postgresql.org>
2024-11-08 08:41 pgsql: Disallow partitionwise join when collations don't match Amit Langote <amitlan@postgresql.org>
2024-11-08 08:41 pgsql: Disallow partitionwise join when collations don't match Amit Langote <amitlan@postgresql.org>
2024-11-08 08:42 pgsql: Disallow partitionwise join when collations don't match Amit Langote <amitlan@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox