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 1roPu5-001MFI-Ru for pgsql-general@arkaria.postgresql.org; Sun, 24 Mar 2024 15:36:58 +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 1roPu4-00DQnD-GC for pgsql-general@arkaria.postgresql.org; Sun, 24 Mar 2024 15:36:56 +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 1roPu4-00DQn5-11 for pgsql-general@lists.postgresql.org; Sun, 24 Mar 2024 15:36:56 +0000 Received: from ssl.schlittermann.de ([46.38.236.101]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1roPu1-006FTf-Fc for pgsql-general@lists.postgresql.org; Sun, 24 Mar 2024 15:36:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=schlittermann.de; s=dd201504; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:From:References:To:Subject:MIME-Version:Date:Message-ID:Cc: Content-Description:Content-ID:Resent-Cc:Resent-To; bh=o+KNGlUssylCgN2p+gf+Hkpo3JMcP++tHdGW71nA9U4=; b=QEoIu/Eqx61MiG/KqkXGDzsezg owZwJHGRWE+QBsIWy3CRKncByYmKAmorO8tmhtiCSD5DGvVjeDLmpMTp+djGk+eq7jjgcm34VT6+5 WTs8lUpyB/UJ+W8QEvpbkbiSrj5DP1v6jpgc3uNeLUG0CKSpKREfTInRWV/wPSwhbZbw=; Received: by ssl.schlittermann.de with esmtpsa (TLS1.3:TLS_AES_128_GCM_SHA256:128) (Exim 4.x) (envelope-from ) id 1roPu0-00Camr-Ko for pgsql-general@lists.postgresql.org; Sun, 24 Mar 2024 16:36:52 +0100 Message-ID: Date: Sun, 24 Mar 2024 16:36:41 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Is this a buggy behavior? To: pgsql-general@lists.postgresql.org References: <51eb3063-1d90-40c6-a8c6-9a77fe105a61@gelassene-pferde.biz> <2005111.1711293431@sss.pgh.pa.us> Content-Language: en-US From: Andreas Kretschmer In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Am 24.03.24 um 16:28 schrieb Thiemo Kellner: > > Am 24.03.2024 um 16:17 schrieb Tom Lane: > >> To do that, we'd have to remember that you'd said NULL, which we >> don't: the word is just discarded as a noise clause. Considering >> that this usage of NULL isn't even permitted by the SQL standard, >> that seems like a bit too much work. > > If I understood correctly, only the NOT NULL expression gets > remembered, but the NULL gets discarded. No, I do not quite get it. > Somehow, it has to be decided whether to create a "check constraint" > or not, but this information is not available any more when creating > the primary key? Not even in some kind of intermediary catalogue? the null-able constraint addition to a column is pointless because by default all columns are nullable. definition as a primary key adds the not null constraint. Andreas -- Andreas Kretschmer CYBERTEC PostgreSQL Services and Support