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 1qNzDv-006Vda-Tq for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Jul 2023 17:19:55 +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 1qNzDu-00CG9M-9y for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Jul 2023 17:19:54 +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 1qNzDu-00CG9E-0h for pgsql-hackers@lists.postgresql.org; Mon, 24 Jul 2023 17:19:54 +0000 Received: from relay7-d.mail.gandi.net ([217.70.183.200]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qNzDr-0003my-TT for pgsql-hackers@lists.postgresql.org; Mon, 24 Jul 2023 17:19:53 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 245CA20005; Mon, 24 Jul 2023 17:19:48 +0000 (UTC) Message-ID: Date: Mon, 24 Jul 2023 19:19:48 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: cataloguing NOT NULL constraints To: Alvaro Herrera , Dean Rasheed Cc: Peter Eisentraut , pgsql-hackers@lists.postgresql.org References: <20230724164228.r57cshpl7v2cxqnj@alvherre.pgsql> From: Vik Fearing Content-Language: en-US In-Reply-To: <20230724164228.r57cshpl7v2cxqnj@alvherre.pgsql> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-GND-Sasl: vik@postgresfriends.org List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 7/24/23 18:42, Alvaro Herrera wrote: > 55490 17devel 3166154=# create table foo (a int constraint nn not null); > CREATE TABLE > 55490 17devel 3166154=# alter table foo add constraint nn not null a; > ERROR: column "a" of table "foo" is already NOT NULL Surely this should be a WARNING or INFO? I see no reason to ERROR here. -- Vik Fearing