Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tsQgq-001p8j-T4 for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Mar 2025 18:20:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tsQgp-00Abwu-Er for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Mar 2025 18:20:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tsQgo-00Abwc-Tg for pgsql-hackers@lists.postgresql.org; Wed, 12 Mar 2025 18:20:23 +0000 Received: from fhigh-a6-smtp.messagingengine.com ([103.168.172.157]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tsQgk-002Um1-2P for pgsql-hackers@postgresql.org; Wed, 12 Mar 2025 18:20:22 +0000 Received: from phl-compute-07.internal (phl-compute-07.phl.internal [10.202.2.47]) by mailfhigh.phl.internal (Postfix) with ESMTP id 637F311400FB; Wed, 12 Mar 2025 14:20:17 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-07.internal (MEProxy); Wed, 12 Mar 2025 14:20:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1741803617; x=1741890017; bh=p tzltjTTlFFr8KDyUHySHNUTmjHNWbGwVHoSnJp5mTY=; b=izYYMMujS0MCIUdDo 0dpRx/aufXf9zEbHeS299qYOYFCM/QzXnPySDBpyQCrz7zW1bRHVW7fjB+vO+aCc 3UnCb7+YKixA2APAy4yrQf4ILS2ul8J4U7hqoeOfPQfBpp9kpbCeVNj47fCudFYs G1du8WtYmr8Khkvws9XkTTxtM2gC8L9uXpTy6njgC59SSwniGqkZAJbhG00lYVDs BEg/2UVmBp1IGWagChaCwX3PT/nFY7agOY79+xGMu185VSgCuKA5pr7Pe9RYCRDP IgkAK7OWDW4R73X4zXnWxsXmdF3h7LqYDK/SQOEdwHN+lhDZqJhEJRMprKkS6zqZ 7Iemw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduvdehjeejucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepfffhvfevuffkgggtugfgjgesthekredttddt jeenucfhrhhomheptehlvhgrrhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlh hvhhdrnhhoqdhiphdrohhrgheqnecuggftrfgrthhtvghrnhepueeiteelkeduteeugfeg ffeltefgkefhgfeftdetfedutedvtdetgeejffetieevnecuffhomhgrihhnpeguvggsih grnhdrnhgvthdpvghnthgvrhhprhhishgvuggsrdgtohhmnecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnh hoqdhiphdrohhrghdpnhgspghrtghpthhtohepfedpmhhouggvpehsmhhtphhouhhtpdhr tghpthhtoheprghshhhuthhoshhhrdgsrghprghtrdhoshhssehgmhgrihhlrdgtohhmpd hrtghpthhtoheprhhushhhrggshhdrlhgrthhhihgrsehgmhgrihhlrdgtohhmpdhrtghp thhtohepphhgshhqlhdqhhgrtghkvghrshesphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 12 Mar 2025 14:20:16 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1741803613; bh=9CDQKQwOi+iKAfLnrCCEl2tTkqrt/i0F2aibRSereYk=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=QOJyzKa0B33jDtITUub+4QqNLksDxjmU/9IqTwWPgtUvHOPL6hKqL/ziA3k5dZvP+ Bnun8P/5t2oVtjomOdhc9kwoC+agvxBKoJSOiyJntk/WBwWz9Xed1xUC5GkYhN2+sN mzFI0un9LOt3ptdDddkSrvkwss7VYPCjLUcVIjcg+QhmMOM3lKRD4C2HRbWZhVLvP0 RwbrqH3xTMsw1eSgg+31ZUKqYjtfqkudKpeW6iixL56MKl16HXUlbZDV0EnQwh26I4 rXXTa2KWUQUcP/yfEg8DhJCne/n3+BZvMCv1+c855tN6rUdnGpIXhbHrbqIklKsPHR XVy8T24Dosthw== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id 6F0FA91; Wed, 12 Mar 2025 19:20:13 +0100 (CET) Date: Wed, 12 Mar 2025 19:20:13 +0100 From: Alvaro Herrera To: Rushabh Lathia Cc: Ashutosh Bapat , PostgreSQL Hackers Subject: Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints Message-ID: <202503121820.lbusvkv4oa6u@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 2025-Mar-12, Rushabh Lathia wrote: > Hi Alvaro, > > Here are the latest patches, which includes the regression fix. Thank you. Taking a step back after discussing this with some colleagues, I need to contradict what I said at the start of this thread. There's a worry that changing pg_attribute.attnotnull in the way I initially suggested might not be such a great idea after all. I did a quick search using codesearch.debian.net for applications reading that column and thinking about how they would react to this change; I think in the end it's going to be quite disastrous. We would break a vast number of these apps, and there are probably countless other apps and frameworks that we would also break. Everybody would hate us forever. Upgrading to Postgres 18 would become as bad an experience as the drastic change of implicit casts to text in 8.3. Nothing else in the intervening 17 years strikes me as so problematic as this change would be. So I think we may need to go back and somehow leave pg_attribute alone, to avoid breaking the whole world. Maybe it would be sufficient to change the CompactAttribute->attnotnull to no longer be a boolean, but the new char representation instead. I'm not sure if this would actually work. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/