Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNOLc-0003ai-VQ for pgsql-bugs@arkaria.postgresql.org; Tue, 29 Sep 2020 22:43:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kNOLb-0006ub-Qq for pgsql-bugs@arkaria.postgresql.org; Tue, 29 Sep 2020 22:43:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNOLb-0006uU-Kx for pgsql-bugs@lists.postgresql.org; Tue, 29 Sep 2020 22:43:47 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNOLV-00079w-E5 for pgsql-bugs@postgresql.org; Tue, 29 Sep 2020 22:43:47 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 08TMhce3725318; Tue, 29 Sep 2020 18:43:38 -0400 From: Tom Lane To: Alvaro Herrera cc: David Rowley , Nagaraj Raj , Pg Bugs Subject: Re: ERROR: insufficient columns in the PRIMARY KEY constraint definition In-reply-to: <20200929223907.GA14950@alvherre.pgsql> References: <20200929223907.GA14950@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Tue, 29 Sep 2020 19:39:07 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <725316.1601419418.1@sss.pgh.pa.us> Date: Tue, 29 Sep 2020 18:43:38 -0400 Message-ID: <725317.1601419418@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera 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