Re: ERROR: insufficient columns in the PRIMARY KEY constraint definition

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: David Rowley <dgrowleyml(at)gmail(dot)com>, Nagaraj Raj <nagaraj(dot)sf(at)yahoo(dot)com>, Pg Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: ERROR: insufficient columns in the PRIMARY KEY constraint definition
Date: 2020-09-29 22:43:38
Message-ID: 725317.1601419418@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> On 2020-Sep-29, Tom Lane wrote:
>> Meh. If you've read that bit you probably already understand that
>> pkeys are unique constraints. I think the problem is with the error
>> text not the docs.

> Maybe mention PKs in parens:

> "Unique constraints (and[, by extension,] primary key constraints) on
> partitioned tables must include all the partition key columns. This
> limitation exists because PostgreSQL can only enforce uniqueness in each
> partition individually.".

I don't object to clarifying that (and that wording seems fine), but I
think fixing the error message is more important. We'd not be having this
discussion if the OP had found that documentation.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David Rowley 2020-09-29 23:08:43 Re: ERROR: insufficient columns in the PRIMARY KEY constraint definition
Previous Message Alvaro Herrera 2020-09-29 22:39:07 Re: ERROR: insufficient columns in the PRIMARY KEY constraint definition