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 1f4YIm-000719-9o for pgsql-hackers@arkaria.postgresql.org; Fri, 06 Apr 2018 20:49:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f4YIl-0004bj-3Z for pgsql-hackers@arkaria.postgresql.org; Fri, 06 Apr 2018 20:49:39 +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_SHA384:256) (Exim 4.89) (envelope-from ) id 1f4YIk-0004bY-SC for pgsql-hackers@lists.postgresql.org; Fri, 06 Apr 2018 20:49:38 +0000 Received: from new1-smtp.messagingengine.com ([66.111.4.221]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f4YIh-0007z9-62 for pgsql-hackers@postgresql.org; Fri, 06 Apr 2018 20:49:38 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id CACBE12BE; Fri, 6 Apr 2018 16:49:33 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 06 Apr 2018 16:49:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=phgHy/Myj5TxjjOKt xoS9corNJDrg8sJBExxwOffWro=; b=E+Ni/Nn/mEb5XOMXuI99Ud60pGS/aJsZN qHpaZXUTcxmoSf0LQzlcL0FaQRiVErHwGJryCuFnPIR3NARgosPZQcQB47C3MBs3 QkC2bvmwH4Yqr9qCURwXAUIRhytW84MqRBVTLAyeG5vMFFTKnd7DxqVRiwz8hVK7 C/eSUed999aMDtcZdKUB97FvxKpJ4ibzWrlVbPavyTJ8C6bkNwmQ4HYjt7kODXk5 BF/UuzBEH5YeBVp3GpnCTbewRrD1v2HhCzDDG1uUaJxra/Ja0V06sjG5y3A/xT+v iHu2DdHgu5pUllkOQYrN/WNVQCRYsvhgwHMShHqXziOYebUyR327w== X-ME-Sender: Received: from alvin.alvh.no-ip.org (unknown [179.56.29.253]) by mail.messagingengine.com (Postfix) with ESMTPA id 1DB5FE4437; Fri, 6 Apr 2018 16:49:33 -0400 (EDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 4216771B; Fri, 6 Apr 2018 17:49:31 -0300 (-03) Date: Fri, 6 Apr 2018 17:49:31 -0300 From: Alvaro Herrera To: Robert Haas Cc: "pgsql-hackers@postgresql.org" Subject: Re: pgsql: Foreign keys on partitioned tables Message-ID: <20180406204931.vx5r5of7h3lq3txf@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170306-137-4415bd-dirty (1.8.0) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Robert Haas wrote: > On Wed, Apr 4, 2018 at 1:03 PM, Alvaro Herrera wrote: > > Foreign keys on partitioned tables > > > > Author: Álvaro Herrera > > Discussion: https://postgr.es/m/20171231194359.cvojcour423ulha4@alvherre.pgsql > > Reviewed-by: Peter Eisentraut > > The commit message here was so brief that I had to read the > documentation to figure out exactly what this feature was. I wrote three draft commit messages, and they all seemed to be saying something so obvious (just repeating the commit title) that I decided not to repeat myself. Evidently that was a mistake. > In so doing, I ran across this, which seems to need some cleanup: > > + Also, while it's possible to define PRIMARY KEY > + constraints on partitioned tables, it is not supported to create foreign > + keys cannot that reference them. This restriction will be lifted in a > + future release. > > Generally, I think we're better off not committing to doing things in > a future release because we never really know what will happen in the > future, True. I removed that sentence, leaving a "yet" that hints to the future without making (I hope) too much of a promise. > but the biggest problem here is that "it is not supported to > create foreign keys cannot that reference them" doesn't make any > sense. I think you mean something like "creating foreign keys that > reference a partitioned table is not supported". Yeah, I edited this a few times and evidently one word from some previous iteration ("cannot") escaped deletion. I liked your wording so I used it. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services