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 1s6ovQ-001xLH-Gl for pgsql-hackers@arkaria.postgresql.org; Tue, 14 May 2024 09:58:26 +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 1s6ovQ-00CLFW-3C for pgsql-hackers@arkaria.postgresql.org; Tue, 14 May 2024 09:58:24 +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 1s6ovP-00CLEb-2w for pgsql-hackers@lists.postgresql.org; Tue, 14 May 2024 09:58:23 +0000 Received: from wfout2-smtp.messagingengine.com ([64.147.123.145]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s6ovJ-000AgH-Fu for pgsql-hackers@lists.postgresql.org; Tue, 14 May 2024 09:58:22 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfout.west.internal (Postfix) with ESMTP id A0C541C000B1; Tue, 14 May 2024 05:58:14 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Tue, 14 May 2024 05:58:15 -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-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1715680694; x= 1715767094; bh=shc/KPAinEgTN5PTxSk/JT/FsDqwFL5N9LRDrEKDIz4=; b=X 0mZx0G1rejbPbfyQ9zlCI2yOJI/Alx0ib+5ws60uulGIQ/gViwyeizqRHowgkNQp EU8OBZT/7Y8FokZgDEnvKJHpno//ie5F+yDmIi3RsIJq5s/HPYnwDOS/SqWvdbqL HXSNpauzwdeZUv8VL/fWa2C0UUwv0hBA8mQCZdWK+qn9vNWF1SpCirN0JV4fKokN Zi1gnuQbGjJ3b0xncTGMlRRP0pPW35rOVGoGe8aKdgDYNGqQpKQ9MzxzrQETLAdU 4I01oTEWACXnixbTTcmUvoEcBMtY/6S+HAjmwTVDA+BZLpEt049SxAhb+9aIr0Q2 SpvNBCtk3/qv5Fyngpnsg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdegiedgvddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepkedthfekveduuefgueelteekgfejgeekueduudeuveeu vddufffggfetiefhvdefnecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrghdpvg hnthgvrhhprhhishgvuggsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 14 May 2024 05:58:13 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1715680691; bh=IFRtxSVz2/UrdiBFWUArXA6Id+jeQ2Ae9pPBcUg7ZRc=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=eVTYWgsH/R8u1lletknjzRkBcd8N7O5yf6QQANB05MFdgu7wch9GziMee2IxN4YPx t1fID68ufvvywjfLjT/oZN+XdXUfkMUmi6xcz/22zo/1pjWGdUAShYQ9F0BtTOBfZ4 brHg6KFy5XK5O3eaj4r4m24wrBiAIjjZOepVQypchrSqoOnSyePWnE1OpeC1e+lpJZ El5tpW2ssDxc/fchflWDPWHtK9LJ9QmiPEd8Hz4ikuZGBjrbNHe9la4Be7OvWmGBiw x6NKyoR1j2zDUu1bbXbGG3JIC3GOnFeEArrO/fryPSqOHa58rbFs6mynyMPNWRf8og W7AoezA4qIwjg== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id 0CFAC10B; Tue, 14 May 2024 11:58:11 +0200 (CEST) Date: Tue, 14 May 2024 11:58:11 +0200 From: Alvaro Herrera To: Robert Haas Cc: Kyotaro Horiguchi , exclusion@gmail.com, dean.a.rasheed@gmail.com, andrewbille@gmail.com, peter@eisentraut.org, pgsql-hackers@lists.postgresql.org, Justin Pryzby Subject: Re: cataloguing NOT NULL constraints Message-ID: <202405140958.wadpw2ittguw@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 2024-May-13, Robert Haas wrote: > It seems to me that the practical thing to do about this problem is > just decide not to solve it. I mean, it's currently the case that if > you establish a PRIMARY KEY when you create a table, the columns of > that key are marked NOT NULL and remain NOT NULL even if the primary > key is later dropped. So, if that didn't change, we would be no less > compliant with the SQL standard (or your reading of it) than we are > now. [...] > So I don't really think it's a great idea to change this behavior, but > even if it is, is it such a good idea that we want to sink the whole > patch set repeatedly over it, as has already happened twice now? I > feel that if we did what Tom suggested a year ago in > https://www.postgresql.org/message-id/3801207.1681057430@sss.pgh.pa.us > -- "I'm inclined to think that this idea of suppressing the implied > NOT NULL from PRIMARY KEY is a nonstarter and we should just go ahead > and make such a constraint" [...] Hmm, I hadn't interpreted Tom's message the way you suggest, and you may be right that it might be a good way forward. I'll keep this in mind for next time. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "No es bueno caminar con un hombre muerto"