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 1u51ob-00B1tX-67 for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Apr 2025 12:24:29 +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 1u51oZ-00Diz2-Dq for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Apr 2025 12:24:28 +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 1u51oY-00Dius-PE for pgsql-hackers@lists.postgresql.org; Wed, 16 Apr 2025 12:24:27 +0000 Received: from fhigh-b2-smtp.messagingengine.com ([202.12.124.153]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u51oV-000OEW-2i for pgsql-hackers@lists.postgresql.org; Wed, 16 Apr 2025 12:24:27 +0000 Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfhigh.stl.internal (Postfix) with ESMTP id 5AE1C2540072; Wed, 16 Apr 2025 08:24:22 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Wed, 16 Apr 2025 08:24:22 -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=fm2; t=1744806262; x=1744892662; bh=P B/icPY7YAc/7CApyb8pwrVJFOiaIXhPd58JcfOr/14=; b=hmz8rmUIcaUNKmEB/ rOxSIXm/TukMTNcrlSt940A4rY7etuWuJ2htSm0KxJgm4dYY0Nw9uSztag9CTp6L rfU65PoGtqxSN/G7Wz+Sk6xxcjn3VMtdsxoVlztKMKfzuLtnHadWAAn6K9LSFn45 8ROY5Q137uz7BFQlelHJ6mZ9yic9cj00Wr6U5mhY7sKDlsCmh4JHofsDIFWgJjBW 51OCmpcoasaDLVw9YhMZVg1T8zOvz+cuVo5OvQ669HV4dlQCdRS8P4QRQ9Wn49Nw NnAS/taHNBYCQkLlxhJggVBWhEm+QGu4koWTuPVjUoxt2TEPSNiGPQXiilsTP+2w 64ipw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvvdeifeeiucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepfffhvfevuffkgggtugfgjgesthekredttddt jeenucfhrhhomheptehlvhgrrhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlh hvhhdrnhhoqdhiphdrohhrgheqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffeh fffhjeejhffgieeuueekjeekfffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvg hrphhrihhsvggusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhep mhgrihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgpdhnsg gprhgtphhtthhopeegpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehjihgrnhdr uhhnihhvvghrshgrlhhithihsehgmhgrihhlrdgtohhmpdhrtghpthhtohepthhnughrfi grnhhgsehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrshes lhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhgpdhrtghpthhtohepthhglhesshhssh drphhghhdrphgrrdhush X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 16 Apr 2025 08:24:21 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1744806258; bh=d5apuH5IzAP6fCdQU2gjhtu89U0/dHDMnaINi1SHv5s=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=CAn8MTWuXXCsjRYfZox1CRPwWT0nEfk900A+U3KXo+HweVX8xB2oednGPGf+sG8G9 gY/UAXY78J0Qt1I/vvG3bsw2wd0eVDhvU0N7AdpCOq8FdsfsVHv7uhOysSeUPIvkSY uPNN/4JtTdd0bxQlNHuiC2WrI8lh0g/NMxKMLvhJSBEBdRbP8vhj6Mb8r8IwUX4lqf ta0q6Hi5k9jk/zRK0XAFimrUFfZLVlltMPK017D6XNUqETRpSFNFgjOfG9732DuupW iHmSktEvqmXzaZrFswRxughXs5Z06GO07oqJkNPNCQeFI9jloZgvkvte8ufMSzVfn1 q9njQzEV0SKcg== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id BD2D88E; Wed, 16 Apr 2025 14:24:18 +0200 (CEST) Date: Wed, 16 Apr 2025 14:24:18 +0200 From: Alvaro Herrera To: Tender Wang Cc: Tom Lane , jian he , Pg Hackers Subject: Re: not null constraints, again Message-ID: <202504161224.xedjghsndf7w@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-Apr-16, Tender Wang wrote: > if (conForm->contype != CONSTRAINT_NOTNULL) > elog(ERROR, "constraint %u is not a not-null constraint", conForm->oid); > > I feel that using conForm->conname is more friendly than oid for users. Yeah, this doesn't really matter because this function would not be called with any other kind of constraint anyway. This test could just as well be an Assert() ... I was pretty torn about that choice TBH (I still am). > Others look good for me. Thanks for looking! -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "No renuncies a nada. No te aferres a nada."