Search Postgresql Archives

Re: Regarding use of single column as primary key on partitioned table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday, September 27, 2024, Durgamahesh Manne <maheshpostgres9@xxxxxxxxx> wrote:

ERROR:  unique constraint on partitioned table must include all partitioning columns
DETAIL:  PRIMARY KEY constraint on table "bet" lacks column "placedon" which is part of the partition key.
test=>

Can't we use primary key on singal column(betid) on partitioned table rather than using composite key (placedon,betid)?

No.  It would be misleading to allow such a thing because a unique index can only span a single partition.

David J.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux