Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j4MKB-0006iI-Kn for pgsql-bugs@arkaria.postgresql.org; Wed, 19 Feb 2020 10:11:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j4MK9-0002i6-Rd for pgsql-bugs@arkaria.postgresql.org; Wed, 19 Feb 2020 10:11:21 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j4MK9-0002hz-Fr for pgsql-bugs@lists.postgresql.org; Wed, 19 Feb 2020 10:11:21 +0000 Received: from n3.nabble.com ([162.255.23.22]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1j4MK6-0001e7-5t for pgsql-bugs@postgresql.org; Wed, 19 Feb 2020 10:11:19 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id BEE681B17A10D for ; Wed, 19 Feb 2020 03:11:16 -0700 (MST) Date: Wed, 19 Feb 2020 03:11:16 -0700 (MST) From: legrand legrand To: pgsql-bugs@postgresql.org Message-ID: <1582107076773-0.post@n3.nabble.com> In-Reply-To: References: Subject: Re: Partitioning Column needs to be Key MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello, this is not supported yet. See: https://www.postgresql.org/docs/12/ddl-partitioning.html that says "Unique constraints on partitioned tables must include all the partition key columns. This limitation exists because PostgreSQL can only enforce uniqueness in each partition individually." It is because PostgreSQL doesn't have any "global index" support yet. If you really want to partition you table on a key that is not in the partition key, you may have a look at www.postgresql-archive.org/PostgreSQL-11-global-index-td6032681.html Regards PAscal -- Sent from: https://www.postgresql-archive.org/PostgreSQL-bugs-f2117394.html