Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1suPGe-006TwQ-Ns for pgsql-general@arkaria.postgresql.org; Sat, 28 Sep 2024 04:41:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1suPFg-002PEj-2q for pgsql-general@arkaria.postgresql.org; Sat, 28 Sep 2024 04:40:16 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1suPFf-002PEa-O7 for pgsql-general@lists.postgresql.org; Sat, 28 Sep 2024 04:40:15 +0000 Received: from smtp91.iad3b.emailsrvr.com ([146.20.161.91]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1suPFd-001QP7-DR for pgsql-general@lists.postgresql.org; Sat, 28 Sep 2024 04:40:14 +0000 X-Auth-ID: xof@thebuild.com Received: by smtp20.relay.iad3b.emailsrvr.com (Authenticated sender: xof-AT-thebuild.com) with ESMTPSA id 732A3A0126; Sat, 28 Sep 2024 00:40:11 -0400 (EDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: Regarding use of single column as primary key on partitioned table From: Christophe Pettus In-Reply-To: Date: Fri, 27 Sep 2024 21:39:40 -0700 Cc: pgsql-general@lists.postgresql.org, pgsql-in-general@postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <9841DB8A-C3D7-42F4-9AE1-83076CAB1576@thebuild.com> References: To: Durgamahesh Manne X-Mailer: Apple Mail (2.3776.700.51) X-Classification-ID: a82dbb02-ab8f-4b4e-ab4a-3ee868f232fc-1-1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Sep 27, 2024, at 21:25, Durgamahesh Manne = wrote: >=20 > Can't we use primary key on singal column(betid) on partitioned table = rather than using composite key (placedon,betid)? No. Any unique constraint on a partitioned table must include the = partition key, including a primary key constraint.=