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: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Amit Langote <amitlangote09(at)gmail(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, 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-10 07:13:07
Message-ID: 20190710071307.GB5042@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers

On Tue, Jul 09, 2019 at 06:59:59PM -0400, Tom Lane wrote:
> Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
>> <listitem>
>> <para>
>> Unique constraints on partitioned tables (as well as primary keys)
>> must constrain all the partition key columns. This limitation exists
>> because <productname>PostgreSQL</productname> can only enforce
>> uniqueness in each partition individually.
>> </para>
>> </listitem>
>
>> I'm not really sure about the "must constrain" verbiage. Is that really
>> comprehensible?
>
> I think "must include" might be better.

+1.

>> which may not be the pinnacle of clarity, but took some time to craft
>> and I think is correct. Also it doesn't mention primary keys
>> explicitly; maybe we should patch it by adding "(as well as a primary
>> key)" right after "a unique constraint". Thoughts?
>
> I'd leave that alone. I don't think the parenthetical comment about
> primary keys in your new text is adding much either.

Agreed with not bothering about this block and not adding the
parenthetical comment.
--
Michael

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message David Harper 2019-07-10 10:13:33 Re: Ambiguous language in Table 8.13. Special Date/Time Inputs [EXT]
Previous Message Amit Langote 2019-07-10 05:30:15 Re: Postgres 11: Table Partitioning and Primary Keys

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2019-07-10 07:17:35 make -jn fails by requiring not-yet-generated include files.
Previous Message Masahiko Sawada 2019-07-10 06:45:05 Re: [Proposal] Table-level Transparent Data Encryption (TDE) and Key Management Service (KMS)