Re: Postgres 11: Table Partitioning and Primary Keys

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, phil(dot)bayer(at)gmail(dot)com, pgsql-docs(at)lists(dot)postgresql(dot)org, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Postgres 11: Table Partitioning and Primary Keys
Date: 2019-07-09 06:49:24
Message-ID: 20190709064924.GA17321@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers

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

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Michael Paquier 2019-07-09 06:51:40 Re: Postgres 11: Table Partitioning and Primary Keys
Previous Message Michael Paquier 2019-07-09 06:34:48 Re: Postgres 11: Table Partitioning and Primary Keys

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2019-07-09 06:51:40 Re: Postgres 11: Table Partitioning and Primary Keys
Previous Message Masahiko Sawada 2019-07-09 06:40:37 Re: [Proposal] Table-level Transparent Data Encryption (TDE) and Key Management Service (KMS)