Hi Team
test=>  CREATE TABLE public.bet (
        betid int4 NOT NULL,
        externalbetid text NULL,
        externalsystem text NULL,
        placedon timestamptz NULL,
        createdon timestamptz NULL
) partition by list (placedon) ;
CREATE TABLE
test=> alter table public.bet add primary key (betid);
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)?

Regards,
Durga Mahesh

Reply via email to