From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Rowley <dgrowleyml@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Nagaraj Raj <nagaraj.sf@yahoo.com>
Cc: Pg Bugs <pgsql-bugs@postgresql.org>
Subject: Re: ERROR: insufficient columns in the PRIMARY KEY constraint definition
Date: Tue, 29 Sep 2020 18:37:35 -0400
Message-ID: <725025.1601419055@sss.pgh.pa.us> (raw)
In-Reply-To: <CAApHDvpgc361yuQ-6493AbgDFgaWPceWU2pp02zZAeS=K=0MBA@mail.gmail.com>
References: <64062533.78364.1601415362244.ref@mail.yahoo.com>
<64062533.78364.1601415362244@mail.yahoo.com>
<CAApHDvrGCKVEQeJ0Tchxkq86NXvF=HzVoROv_jGAGYv61P8Tuw@mail.gmail.com>
<724329.1601418149@sss.pgh.pa.us>
<CAApHDvpgc361yuQ-6493AbgDFgaWPceWU2pp02zZAeS=K=0MBA@mail.gmail.com>
David Rowley <dgrowleyml@gmail.com> writes:
> On Wed, 30 Sep 2020 at 11:22, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Indeed. However, this complaint shows that the error message is not clear
>> enough. I propose changing it to
>> ERROR: unique constraint on partitioned table must be a superset of the partitioning columns
>> or perhaps
>> ERROR: unique constraint on partitioned table must include all partitioning columns
> I prefer the former. Although I'd rather see the constraint type
> mentioned explicitly rather than using the word "unique" regardless of
> what the constraint type is.
If the DETAIL has that, which it does, I'd rather have the primary text
lay out the general rule not a specific case. Anybody who is not clear
that a pkey is a kind of unique constraint will get that from reading the
DETAIL. Also, avoiding that insertion should allow more robust
translation of the primary message, which is something we should worry
about if we are concerned that users won't understand the message.
FWIW, after a few minutes' more thought I think I like the second wording;
it's just as precise and does not rely on two-dollar words. I'm not dead
set on it though.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, dgrowleyml@gmail.com, alvherre@2ndquadrant.com, nagaraj.sf@yahoo.com
Subject: Re: ERROR: insufficient columns in the PRIMARY KEY constraint definition
In-Reply-To: <725025.1601419055@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox