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 1plmNU-0005mG-63 for pgsql-bugs@arkaria.postgresql.org; Mon, 10 Apr 2023 07:55:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1plmNS-0000rS-Nw for pgsql-bugs@arkaria.postgresql.org; Mon, 10 Apr 2023 07:55:50 +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 1plmNQ-0000rJ-Vw for pgsql-bugs@lists.postgresql.org; Mon, 10 Apr 2023 07:55:50 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1plmNM-0005fc-QV for pgsql-bugs@lists.postgresql.org; Mon, 10 Apr 2023 07:55:47 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 348CB5C0092; Mon, 10 Apr 2023 03:55:42 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 10 Apr 2023 03:55:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1681113342; x=1681199742; bh=v6 6GcPcNwtT6SyOjE9NAMytehRVB2cfWfVSRxtxN89M=; b=1puLY/OuOfbi8P4hPL +IBl5ddPRqwE1wG8/7umJuVuWV/ng0DJPgMu6fozmN9tDXXMhCK/rEi3XOSO/hzV ZnIKHJDgHAvsI+eaJNz0q63R2F7ol/iE1ynXP1p6Jqlgx61r3MWUbdmkS5novU7i zCmdUOxQaxVMJwsbykgtsccD2CCwWaKi41gZBrx6wDRHeGYA1wragOPgLE60jwmd qIjfV+niKLiNI7tePv1Ya/VisPGjTzCbGEraU7L5ZYHgq6Fb0q5n6PJoSzdebkIu OmHtFA5fLDUfr8kMXMPaXa2/BwMJCiGVbPi2XomDO3Vm9EFf4zmfQF5EWRAewqSV bCqw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1681113342; x=1681199742; bh=v66GcPcNwtT6S yOjE9NAMytehRVB2cfWfVSRxtxN89M=; b=HVIjD0uZjdM0YcyVUuIYOhGxWID8O 5EoaJ7OUbYSh3XnSpGkcBuL4HSMZa9GSFEVpfGUmuPxCRbaXv6fKKVyyZENTRkuZ LdloWjSNLsxa1PT+zrzP4Xqm4b5BD4FmMucVJfWk0G86Mw9E0o+rhWpsJD6Q3dqd bqQkKWF+Zo2C4Wpd9AnO2Kik7rf1LgxIrT7bst8cZOiVHDmiCTQUR9aI3NCP7/L0 Xhz4/F9UQuxXPR629XhPgyFyOhVKIBQumwse+tIL3rNAqBXm3wncHXtkvitFgYrn 2Im32WGZhxarvxzDp1S3FNqr74GGYBLb3NtqRclKDTloWze2ymnjoepxQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdekuddguddvkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecufghrlhcuvffnffculdefhedmnecujfgurhepff fhvfevuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcurfgr qhhuihgvrhcuoehmihgthhgrvghlsehprghquhhivghrrdighiiiqeenucggtffrrghtth gvrhhnpeegffejvefgveduvdejtddvtdeijeehudeuledvudeftdfgfeejvdekveekiedv vdenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgv rhdrgiihii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 10 Apr 2023 03:55:39 -0400 (EDT) Date: Mon, 10 Apr 2023 16:55:28 +0900 From: Michael Paquier To: Richard Guo Cc: PostgreSQL mailing lists Subject: Re: ERROR: no NOT NULL constraint found to drop Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="FmdYV7xHEW3pvx8v" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --FmdYV7xHEW3pvx8v Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 10, 2023 at 03:16:06PM +0800, Richard Guo wrote: > I run into error $subject with the query below: >=20 > # create table t1 (c int primary key null unique); > CREATE TABLE > # create table t2 (like t1); > CREATE TABLE > # alter table t2 alter c drop not null; > ERROR: no NOT NULL constraint found to drop >=20 > This starts since e056c557ae. I guess this shouldn't happen since the > comment says so. >=20 > /* this shouldn't happen */ > elog(ERROR, "no NOT NULL constraint found to drop"); Thanks for the report. This is not the only issue that has been pointed out with this patch, so it is going to be reverted if you look around here: https://www.postgresql.org/message-id/3863449.1681071102@sss.pgh.pa.us -- Michael --FmdYV7xHEW3pvx8v Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmQzwPAACgkQnvQgOdby QH1j6g/+KjzTRl7WbfJKkBf1D4AZhehNy1pkipykZCCRCtyV2ZWKCYT++6cqXa02 i/yRlEzzkFgJPDOm/pmIaRCKzf8rgPTPTqrdjXiAeflcNLvt3R1fk0B4DsNfNE47 VLVOdsVVIaSjgInFn5U560XkmSfWV3Cle4ZV411ISht0OCcdv5If4HPKxhhXNdf6 FqavfbrYM5s6RgCPXGZafxR35LoVf4ZeW2tRdSC7T+mMAXPa9B9iI3tYv9B03uqr FqdRxRJCqG8w956wOBZxQQEz1WzlidIEKdlBdHYQ/C+4o3bgOgIFQGyN3XK4Az2v CWn6kWOiSj/Smt3TA5lBov2tTm6llFW83PjaB/R68yZt0RPj4CTY6qfnALThIzuB 5qF4llRQ5cE/OpKOzo3j85TS5phHwwdgtdHW7w5oD7CqMbf0LTxAjlaflZN8/jJE mi4/Jni8SNDhnTf0kTw5V1d8d6OfzaXFUdMLQx2y0keaL+DJhlIyzSFYu9eA0a9d ixvdasl2qVGj2SAptyfwUX2dBTCjTbtE6DvKWBOn7nqvYEYaEKNbkJQ615ffTt/E 2EMcXCdXBiCkXqcsXKfmWJwI5utNtLwk1F7yGbqY0D/uAv5KipbUZuncjXqW79Ep Xp+YQxP0dW6VjPjpnH35vRhoxZW4F7sqHbhtI+HEEwY2fQmWsAw= =ck6X -----END PGP SIGNATURE----- --FmdYV7xHEW3pvx8v--