we have some partitioned tables with inherence and planning to migrate them to the declaration.
Table DDL:
CREATE TABLE c_account_p
(
billing_account_guid character varying(40) NOT NULL,
ingestion_process_id bigint NOT NULL DEFAULT '-1'::integer,
load_dttm timestamp(6) without time zone NOT NULL,
ban integer NOT NULL,
CONSTRAINT billing_account_pkey PRIMARY KEY (billing_account_guid, ban)
ERROR: insufficient columns in the PRIMARY KEY constraint definition
DETAIL: PRIMARY KEY constraint on table "l_billing_account_p" lacks column "load_dttm" which is part of the partition key.
Is it mandatory/necessary that the partition column should be a primary key? cause if I include load_dttm as PK then it's working fine.db<>fiddle
If I receive billing_account_guid, ban combination with different load_dttm then it will end up with duplicate keys.