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 1t9RoS-00AF78-Bh for pgsql-hackers@arkaria.postgresql.org; Fri, 08 Nov 2024 16:26:19 +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 1t9RoP-00B1AG-41 for pgsql-hackers@arkaria.postgresql.org; Fri, 08 Nov 2024 16:26:17 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t9RoO-00B1A7-Qo for pgsql-hackers@lists.postgresql.org; Fri, 08 Nov 2024 16:26:17 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t9RoM-000pff-D7 for pgsql-hackers@lists.postgresql.org; Fri, 08 Nov 2024 16:26:16 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 4A8GQBCs3649829; Fri, 8 Nov 2024 11:26:11 -0500 From: Tom Lane To: Alvaro Herrera cc: jian he , Pg Hackers , Tender Wang Subject: Re: not null constraints, again In-reply-to: <202411081308.nxj6dy2xui6a@alvherre.pgsql> References: <202411081308.nxj6dy2xui6a@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Fri, 08 Nov 2024 14:08:10 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3649827.1731083171.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 08 Nov 2024 11:26:11 -0500 Message-ID: <3649828.1731083171@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alvaro Herrera writes: > But we'll see what else the buildfarm has to say now that I pushed it ..= . A lot of the buildfarm is saying adder | 2024-11-08 13:04:39 | ../pgsql/src/backend/catalog/pg_con= straint.c:708:37: warning: comparison is always true due to limited range = of data type [-Wtype-limits] which evidently is about this: Assert(colnum > 0 && colnum <=3D MaxAttrNumber); The memcpy right before that doesn't seem like project style either. Most other places that are doing similar things just cast the ARR_DATA_PTR to the right pointer type and dereference it. regards, tom lane