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 1qZHP9-004pWO-3w for pgsql-committers@arkaria.postgresql.org; Thu, 24 Aug 2023 20:58:11 +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 1qZHP6-00CrdK-QE for pgsql-committers@arkaria.postgresql.org; Thu, 24 Aug 2023 20:58:08 +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 1qZHP6-00CrcT-IK for pgsql-committers@lists.postgresql.org; Thu, 24 Aug 2023 20:58:08 +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 1qZHOz-000m06-0N for pgsql-committers@lists.postgresql.org; Thu, 24 Aug 2023 20:58:07 +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 37OKvxWq3979067; Thu, 24 Aug 2023 16:57:59 -0400 From: Tom Lane To: Andrew Dunstan cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Cache by-reference missing values in a long lived context In-reply-to: References: <3907902.1692890821@sss.pgh.pa.us> Comments: In-reply-to Andrew Dunstan message dated "Thu, 24 Aug 2023 16:36:51 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <3979065.1692910679.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 24 Aug 2023 16:57:59 -0400 Message-ID: <3979066.1692910679@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andrew Dunstan writes: > On 2023-08-24 Th 11:27, Tom Lane wrote: >> The v11 version of this patch is causing a compiler warning for me: > Sorry about that, fixed. Thanks! > While we're about it, let's also fix these warnings which are seen on my= = > systems building releases 11 and 12: > /home/andrew/bf/root/REL_11_STABLE/pgsql.build/../pgsql/src/backend/comm= ands/foreigncmds.c:481:22: = > warning: =E2=80=98funcargtypes=E2=80=99 may be used uninitialized [-Wmay= be-uninitialized] > /home/andrew/bf/root/REL_12_STABLE/pgsql.build/../pgsql/src/backend/comm= ands/foreigncmds.c:487:22: = > warning: =E2=80=98funcargtypes=E2=80=99 may be used uninitialized [-Wmay= be-uninitialized] > Maybe funcargtypes here should be initialized to { 0 } ? Hm. It looks like we got rid of those warnings in v13 via dcb7d3caf: Author: Alvaro Herrera Branch: master Release: REL_13_BR [dcb7d3caf] 2019-11-12 17:06:58 -030= 0 Have LookupFuncName accept NULL argtypes for 0 args I'm a little tempted to propose that a better solution is to back-patch that patch. Removing the warning alone doesn't make a very strong case for that, but there are other arguments: * Somebody might back-patch code relying on the newer convention; * All else being equal, it's better to keep the code in different branches looking similar. I'm not sure if those arguments justify a back-patch instead of the localized hack you suggest. regards, tom lane