Re: Regarding use of single column as primary key on partitioned table - Mailing list pgsql-general

From Christophe Pettus
Subject Re: Regarding use of single column as primary key on partitioned table
Date
Msg-id 9841DB8A-C3D7-42F4-9AE1-83076CAB1576@thebuild.com
Whole thread Raw
In response to Regarding use of single column as primary key on partitioned table  (Durgamahesh Manne <maheshpostgres9@gmail.com>)
List pgsql-general

> On Sep 27, 2024, at 21:25, Durgamahesh Manne <maheshpostgres9@gmail.com> wrote:
>
> Can't we use primary key on singal column(betid) on partitioned table rather than using composite key
(placedon,betid)?

No.  Any unique constraint on a partitioned table must include the partition key, including a primary key constraint.


pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Regarding use of single column as primary key on partitioned table
Next
From: Ron Johnson
Date:
Subject: Re: Regarding use of single column as primary key on partitioned table