Re: BUG #18568: BUG: Result wrong when do group by on partition table!
Tender Wang <tndrwang@gmail.com>
From: Tender Wang <tndrwang@gmail.com>
To: 1105066510@qq.com, pgsql-bugs@lists.postgresql.org
Date: 2024-08-06T13:23:44Z
Lists: pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> 于2024年8月6日周二 15:01写道: > The following bug has been logged on the website: > > Bug reference: 18568 > Logged by: Webbo Han > Email address: 1105066510@qq.com > PostgreSQL version: 16.3 > Operating system: centos 7.6 > Description: > > First, we create one case-insensitive collation use ICU: > ```sql > CREATE COLLATION case_insensitive ( > provider = icu, > locale = 'und-u-ks-level2', > deterministic = false > ); > ``` > > Then, we create the partition table, meanwhile we set the collation of > column c to `case_insensitive`, > and set partkey's collation to 'C'. > ```sql > SET enable_partitionwise_aggregate TO true; > SET enable_partitionwise_join TO true; > SET max_parallel_workers_per_gather TO 0; > SET enable_incremental_sort TO off; > CREATE TABLE pagg_tab (c text collate case_insensitive) PARTITION > BY LIST(c > collate "C"); > I think above create table again. Should we allow this CREATE TABLE? The partition key definition are not same with column definiton. Is it better to report error for users? -- Tender Wang
Commits
-
Disallow partitionwise grouping when collations don't match
- 90fe6251c816 18.0 landed
- b6484ca9535e 17.1 landed
- dd2f8ebee221 16.5 landed
- 0a620659c549 15.9 landed
- 96f9b29a3e1e 14.14 landed
- ff65f695c0d3 13.17 landed
- 46d9be5efb1a 12.21 landed
-
For partitionwise join, match on partcollation, not parttypcoll.
- 2af28e603319 11.0 cited