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 1t3RtS-00Ca78-OO for pgsql-committers@arkaria.postgresql.org; Wed, 23 Oct 2024 03:18:42 +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 1t3RtQ-005fPV-3q for pgsql-committers@arkaria.postgresql.org; Wed, 23 Oct 2024 03:18:40 +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 1t3RtP-005fPN-T7 for pgsql-committers@lists.postgresql.org; Wed, 23 Oct 2024 03:18:40 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t3RtL-002Udx-QG; Wed, 23 Oct 2024 03:18:39 +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 49N3IYgW2144896; Tue, 22 Oct 2024 23:18:34 -0400 From: Tom Lane To: Jeff Davis cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Add functions pg_set_attribute_stats() and pg_clear_attribute_st In-reply-to: References: Comments: In-reply-to Jeff Davis message dated "Tue, 22 Oct 2024 22:24:42 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2144894.1729653514.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 22 Oct 2024 23:18:34 -0400 Message-ID: <2144895.1729653514@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Jeff Davis writes: > Add functions pg_set_attribute_stats() and pg_clear_attribute_stats(). A couple of buildfarm animals, eg [1], are mildly unhappy: In file included from ../../../src/include/nodes/execnodes.h:37:0, from ../../../src/include/catalog/indexing.h:19, from attribute_stats.c:21: attribute_stats.c: In function \342\200\230text_to_stavalues\342\200\231: ../../../src/include/nodes/miscnodes.h:54:15: warning: the comparison will= always evaluate as \342\200\230true\342\200\231 for the address of \342\2= 00\230escontext\342\200\231 will never be NULL [-Waddress] ((escontext) !=3D NULL && IsA(escontext, ErrorSaveContext) && \\ ^ attribute_stats.c:636:6: note: in expansion of macro \342\200\230SOFT_ERRO= R_OCCURRED\342\200\231 if (SOFT_ERROR_OCCURRED(&escontext)) ^ I think what we've done in other places is just to test escontext.error_occurred directly, since the rest of the macro is useless in this situation. regards, tom lane [1] https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=3Drhinoc= eros&dt=3D2024-10-23%2000%3A47%3A26&stg=3Dmake