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 1oQX5p-0003RN-Hl for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Aug 2022 16:49:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oQX5o-0007dj-Fb for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Aug 2022 16:49:32 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oQX5o-0007da-6Y for pgsql-hackers@lists.postgresql.org; Tue, 23 Aug 2022 16:49:32 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oQX5l-0007bC-Se for pgsql-hackers@lists.postgresql.org; Tue, 23 Aug 2022 16:49:31 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 3B0C55C01FE; Tue, 23 Aug 2022 12:49:29 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 23 Aug 2022 12:49:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1661273369; x=1661359769; bh=X vvGCkwN7EcNjTQTC/J25yHocP763m0QK9dCMaDK/Ag=; b=zjGPcEOZhZk66mj0Z o6+nhzClw7XG+RLVOGbqZZWw9HHlU5Rmq5WCxUIDSaIpBV3Gus722vuiZ6z6+i4a Pww+ifRW/j1E0SPdbrhU1WwVqVY0UTmCUi0Wzjt6vXKb1MlqpC3bFMyL0pINRaAO tlf/iPyr8/tP7HeNFN6n8RXuTDp9K9/yzPDSUJvQh7pn91XD71XvX9ADp/cwlo7y F3Fp04SjLmE5wuxR/gepa/R1XykkmlbtfXJY+g3N0yY1l+yeUuzcGnRdXnw5jGon MTMHVf5JFNad9aAnGVtdfMdmub75qbeKRcx2pHs8bEW8t8RBdPN7AAF+bVNU/vrx qdyqg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdeiledguddthecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhv rghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorh hgqeenucggtffrrghtthgvrhhnpedvkedtffduffdtffffheffhfejjefhgfeiueeukeej keffgfdufffhudffffeuveenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtoh hmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghl vhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 23 Aug 2022 12:49:28 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 48B82373; Tue, 23 Aug 2022 18:49:26 +0200 (CEST) Date: Tue, 23 Aug 2022 18:49:26 +0200 From: Alvaro Herrera To: Amit Langote Cc: Laurenz Albe , Pg Hackers Subject: Re: cataloguing NOT NULL constraints Message-ID: <20220823164926.qscpp3lbtgs3nvbk@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2022-Aug-22, Amit Langote wrote: > Yeah, I think it makes sense to think of the NOT NULL constraints on > their own in this case, without worrying about the PK constraint that > created them in the first place. Cool, that's enough votes that I'm comfortable implementing things that way. > BTW, maybe you are aware, but the legacy inheritance implementation is > not very consistent about wanting to maintain the same NULLness for a > given column in all members of the inheritance tree. For example, it > allows one to alter the NULLness of an inherited column: Right ... I think what gives this patch most of its complexity is the number of odd, inconsistent cases that have to preserve historical behavior. Luckily I think this particular behavior is easy to implement. > IIRC, I had tried to propose implementing the same behavior for legacy > inheritance back in the day, but maybe we left it alone for not > breaking compatibility. Yeah, that wouldn't be surprising. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "The problem with the facetime model is not just that it's demoralizing, but that the people pretending to work interrupt the ones actually working." (Paul Graham)