From: | Tender Wang <tndrwang(at)gmail(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Cc: | Amit Langote <amitlangote09(at)gmail(dot)com> |
Subject: | Re: Wrong result when enable_partitionwise_join is on if collation of PartitionKey and Column is different. |
Date: | 2024-10-24 04:46:23 |
Message-ID: | CAHewXN=sGCF7cp3r+8PyZXP0TT+Q1imoEe-7Z-0Sxxb76eWAXg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tender Wang <tndrwang(at)gmail(dot)com> 于2024年10月23日周三 21:48写道:
> Hi all,
>
> I find another issue as $SUBJECT when I work on [1].
>
When I continue to work on this, I find below issue. But I'm not sure
whether it is a bug.
postgres=# create table part_index(a text primary key) partition by list (
a collate "POSIX");
ERROR: unique constraint on partitioned table must include all
partitioning columns
DETAIL: PRIMARY KEY constraint on table "part_index" lacks column "a"
which is part of the partition key.
postgres=# create table part_index(a text) partition by list ( a collate
"POSIX");
CREATE TABLE
postgres=# alter table part_index add primary key (a);
ERROR: unique constraint on partitioned table must include all
partitioning columns
DETAIL: PRIMARY KEY constraint on table "part_index" lacks column "a"
which is part of the partition key.
It seems we can't create a primary key if the collation is different
between columnDef and PartitionKey.
By the way, I think the error message is misleading to users.
ostgres=# alter table part_index add primary key (a);
ERROR: unique constraint on partitioned table must include all
partitioning columns
DETAIL: PRIMARY KEY constraint on table "part_index" lacks column "a"
which is part of the partition key.
--
Thanks,
Tender Wang
From | Date | Subject | |
---|---|---|---|
Next Message | Dilip Kumar | 2024-10-24 04:50:34 | Re: Can rs_cindex be < 0 for bitmap heap scans? |
Previous Message | Michael Paquier | 2024-10-24 04:17:39 | Re: Refactor to use common function 'get_publications_str'. |