Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lRepi-0003rD-1A for pgsql-bugs@arkaria.postgresql.org; Wed, 31 Mar 2021 17:40:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lRepg-00086c-G4 for pgsql-bugs@arkaria.postgresql.org; Wed, 31 Mar 2021 17:40:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lRepg-00086V-9h for pgsql-bugs@lists.postgresql.org; Wed, 31 Mar 2021 17:40:44 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lRepe-0004Rw-Ce for pgsql-bugs@postgresql.org; Wed, 31 Mar 2021 17:40:43 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id B90F75C00DB; Wed, 31 Mar 2021 13:40:40 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 31 Mar 2021 13:40:40 -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-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=miJM9WQRmNfBnOPHwUryd/AaUvrsqsog948ITSZPF70=; b=RPgfzFf3 UMCMX3KQdfW9iq/pSVA/kO6LFLMQ2CDd8R46tPPERzBcGAwShtJmcDuYbf9K8K/n vm6ULgnV22O0eukbzQVZXXNDZFFybyRaQupI3aaKYsPT74J7uwEu3eoaMHQnVd9C IQXeDnGj5oSWzYHm6do7iflTbd6KKBxvqC1sOWQGqHCidbaON9MqsA2ay6w8BUPm tIhsy77iI/Am8MmiUUQQw+A8Z9pHL7nJeA4gKufVZ295v5bBOZIymCnGzun2Ae7V tSwUaa5I4z8Gy/3v5CoV3EFmCcHN+Dltb6gPa9xzJBN90AScLgz7iC3QVbDmz8hm k/qSI6DX4U48Nw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudeivddguddulecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkgggtugfgjggfsehtkeertddtredunecuhfhrohhmpeetlhhv rghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorh hgqeenucggtffrrghtthgvrhhnpeeufffhjeeiueeuffegvddukeegledtveeivdeiueef ieeivefgteehueefteehvdenucfkphepudeltddrleehrdduledrleehnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegr lhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.19.95]) by mail.messagingengine.com (Postfix) with ESMTPA id 0DEA41080063; Wed, 31 Mar 2021 13:40:40 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 83BB42A0CAD; Wed, 31 Mar 2021 14:40:37 -0300 (-03) Date: Wed, 31 Mar 2021 14:40:37 -0300 From: Alvaro Herrera To: Tom Lane Cc: Alexey Bashtanov , pgsql-bugs@postgresql.org Subject: Re: should all not-null constraints be inherited? Message-ID: <20210331174037.GA344@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3228609.1617210121@sss.pgh.pa.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Mar-31, Tom Lane wrote: > Yeah, that's been on the to-do list for a long time. The current > theory about it is that NOT NULL constraints ought to be represented > as entries in pg_constraint like CHECKs are, so that the inheritance > count and so forth could be managed the same way. We could keep > attnotnull for convenience but it'd just mirror the existence of > the pg_constraint entry. > > IIRC Alvaro had a WIP patch for this, but I've not heard anything > about it lately. That one is the first thing on my list for the next cycle. -- Álvaro Herrera Valdivia, Chile