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 1hTVKH-0005em-EN for pgsql-general@arkaria.postgresql.org; Wed, 22 May 2019 17:46:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hTVKE-0002Ay-TF for pgsql-general@arkaria.postgresql.org; Wed, 22 May 2019 17:46:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hTVKE-0002Ar-Jk for pgsql-general@lists.postgresql.org; Wed, 22 May 2019 17:46:50 +0000 Received: from mail.thgp.ru ([81.200.241.50]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hTVK7-0000UL-Vr for pgsql-general@lists.postgresql.org; Wed, 22 May 2019 17:46:49 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.thgp.ru (Postfix) with ESMTP id 1616C218236 for ; Wed, 22 May 2019 20:46:41 +0300 (MSK) Received: from mail.thgp.ru ([127.0.0.1]) by localhost (mail.thgp.ru [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id N-oWfamwM8Zb for ; Wed, 22 May 2019 20:46:40 +0300 (MSK) Received: from localhost (localhost [127.0.0.1]) by mail.thgp.ru (Postfix) with ESMTP id A29AA218238 for ; Wed, 22 May 2019 20:46:40 +0300 (MSK) X-Virus-Scanned: amavisd-new at thgp.ru Received: from mail.thgp.ru ([127.0.0.1]) by localhost (mail.thgp.ru [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id pk-8TZxTy_p6 for ; Wed, 22 May 2019 20:46:40 +0300 (MSK) Received: from zloy.amtech.local (vmhost.amtech.local [81.200.241.62]) by mail.thgp.ru (Postfix) with ESMTPSA id 688C8218233 for ; Wed, 22 May 2019 20:46:40 +0300 (MSK) To: pgsql-general@lists.postgresql.org From: User Subject: Table partition with primary key in 11.3 Message-ID: <94935ac5-2f65-3c41-c14d-1b13da8e19ca@penek.org> Date: Wed, 22 May 2019 20:46:39 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk CREATE TABLE public.test1 ( x1 integer NOT NULL, x2 integer NOT NULL, CONSTRAINT test1_pkey PRIMARY KEY (x1) INCLUDE(x2) ) PARTITION BY RANGE (x2); This query works in 11.1 but fails in 11.3 with messages: ERROR: insufficient columns in PRIMARY KEY constraint definition DETAIL: PRIMARY KEY constraint on table "test1" lacks column "x2" which is part of the partition key. SQL state: 0A000