Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f2GFt-00078l-4P for pgsql-hackers@arkaria.postgresql.org; Sat, 31 Mar 2018 13:09:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f2GFr-0001DA-4A for pgsql-hackers@arkaria.postgresql.org; Sat, 31 Mar 2018 13:09:11 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f2GFp-0001D0-UD for pgsql-hackers@lists.postgresql.org; Sat, 31 Mar 2018 13:09:10 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f2GFj-0004pv-VF for pgsql-hackers@postgresql.org; Sat, 31 Mar 2018 13:09:08 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 74D4F21042; Sat, 31 Mar 2018 09:09:02 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Sat, 31 Mar 2018 09:09:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=GBFDLw FKBrmbw0/QcoqSzA5FbaLyvna9yqOLmpEcEQM=; b=fW5hzZeE1XFCqWyxOmCge4 oqI2lSPqpcr1a1K367e0e9aGkha4ECKFe7oNCCb8C6xqrbDwpouprpo71zdlBjq1 QGJr6uJFuYCBt6lXly0vOvTrmmP70wsemTqCBrBo6ARx4/IMSLVdFYqLcGF8tey+ jzs/S5c1hgSv/q4t3d+PMfzVWwdNrXrkRdtDuP2UFfbOyK1Wc15n7qDQOgZ2/vXe 00qDSzRhESw8lpvWiS//rraEB+3Y5u+lApwZ2n4sKMAxogybMi+kUjY8vkzyeHox 4iLC106Ie97wrBuK0Uzjzd4BpwE/9qqTdy5eWBjxdmARPvEEhBOXuAmZHar8Pabg == X-ME-Sender: Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id 40AC7E444F; Sat, 31 Mar 2018 09:09:02 -0400 (EDT) Subject: Re: Foreign keys and partitioned tables To: Alvaro Herrera , Pg Hackers References: <20180330031953.5j4sspyl6s4rdb62@alvherre.pgsql> From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <8a3e483c-d89f-6872-74ac-5f0ee36357eb@2ndquadrant.com> Date: Sat, 31 Mar 2018 09:09:01 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180330031953.5j4sspyl6s4rdb62@alvherre.pgsql> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 3/29/18 23:19, Alvaro Herrera wrote: > 0001 prohibits having foreign keys pointing to partitioned tables, as > discussed above. This is already prohibited. You get an error ERROR: cannot reference partitioned table "fk_partitioned_pk" Your patch 0001 just adds the same error check a few lines above the existing one, while 0003 removes the existing one. I think you can squash 0001 and 0003 together. > 0002 is a fixup for a bug in the row triggers patch: I had a restriction > earlier that triggers declared internal were not cloned, and I seem to > have lost it in rebase. Reinstate it. Hmm, doesn't cause any test changes? -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services