Re: Postgres 11: Table Partitioning and Primary Keys - Mailing list pgsql-docs

From Michael Paquier
Subject Re: Postgres 11: Table Partitioning and Primary Keys
Date
Msg-id 20190709064924.GA17321@paquier.xyz
Whole thread Raw
In response to Re: Postgres 11: Table Partitioning and Primary Keys  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-docs
On Mon, Jul 08, 2019 at 11:10:51PM -0400, Tom Lane wrote:
> Isn't it the other way around, that the partition key column(s) must
> be
> included in the primary key?  Maybe I'm confused, but it seems like
> we couldn't enforce PK uniqueness otherwise.

Yes you are right.  The full column list of the partition key needs to
be included in the constraint, but that's not true the other way
around.
--
Michael

Attachment

pgsql-docs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Postgres 11: Table Partitioning and Primary Keys
Next
From: Michael Paquier
Date:
Subject: Re: Postgres 11: Table Partitioning and Primary Keys