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 1kNOwD-0004ek-6k for pgsql-bugs@arkaria.postgresql.org; Tue, 29 Sep 2020 23:21:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kNOwB-0002Bx-Of for pgsql-bugs@arkaria.postgresql.org; Tue, 29 Sep 2020 23:21:35 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNOwB-0002Bq-IS for pgsql-bugs@lists.postgresql.org; Tue, 29 Sep 2020 23:21:35 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNOw9-00042e-EZ for pgsql-bugs@postgresql.org; Tue, 29 Sep 2020 23:21:34 +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 08TNLULG727065; Tue, 29 Sep 2020 19:21:30 -0400 From: Tom Lane To: David Rowley cc: Alvaro Herrera , Nagaraj Raj , Pg Bugs Subject: Re: ERROR: insufficient columns in the PRIMARY KEY constraint definition In-reply-to: References: <20200929223907.GA14950@alvherre.pgsql> <725317.1601419418@sss.pgh.pa.us> Comments: In-reply-to David Rowley message dated "Wed, 30 Sep 2020 12:13:56 +1300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <727063.1601421690.1@sss.pgh.pa.us> Date: Tue, 29 Sep 2020 19:21:30 -0400 Message-ID: <727064.1601421690@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk David Rowley writes: > On Wed, 30 Sep 2020 at 12:08, David Rowley wrote: >> Alvaro Herrera writes: >>> "Unique constraints (and[, by extension,] primary key constraints) on >>> partitioned tables must include all the partition key columns. > I didn't go with the same wording. The reason was that I didn't feel > the word "constraint" had to be mentioned twice. > I won't object if you or Alvaro want to keep Alvaro's suggestion though. I kind of like Alvaro's wording because it helps to reinforce the point that pkeys are a type of unique constraint. If you dislike repeating "constraints", perhaps we could go with something like Unique constraints (and hence primary keys) on partitioned tables ... I'm not hugely against your wording though. regards, tom lane