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.98.2) (envelope-from ) id 1xQu6V-00000000UgT-3TeJ for pgsql-committers@arkaria.postgresql.org; Tue, 10 Nov 2026 22:14:11 +0000 Received: from localhost ([127.0.0.1]:48650 helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xQu6U-00000006juR-23qC for pgsql-committers@arkaria.postgresql.org; Tue, 10 Nov 2026 22:14:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]:41762) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xQu6U-00000006juJ-1ByI for pgsql-committers@lists.postgresql.org; Tue, 10 Nov 2026 22:14:10 +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.98.2) (envelope-from ) id 1xQu6S-00000000GOX-1c22 for pgsql-committers@lists.postgresql.org; Tue, 10 Nov 2026 22:14:08 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.18.1/8.18.1) with ESMTP id 6AAME1fk3034121; Tue, 10 Nov 2026 17:14:01 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 sss.pgh.pa.us 6AAME1fk3034121 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sss.pgh.pa.us; s=default; t=1794348841; bh=W4xpWv5NXtNnk38HtVUbfir1SQ74iguACa+ZxKrtWJE=; h=From:To:cc:Subject:In-reply-to:References:Date:From; b=wihVHAzoEt2J7AisoCkTqhmWNZao1p24cfqsQ6Vk8gqfXQ1dXPiIjoJExq+47eaM+ 5UWNqatVPTO1RWdV7RdR3RrCDuIS8SY2nY1GXeXx6jPKrZskOHDmvSB6m+7Gv156zy ud7XKhRf0kLMxiq7s1sIIKappU5qrVm71ii40PnM= From: Tom Lane To: David Rowley cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Add optional parameter to PG_TRY() macros In-reply-to: References: Comments: In-reply-to David Rowley message dated "Wed, 11 Nov 2026 10:45:42 +1300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3034119.1794348841.1@sss.pgh.pa.us> Date: Tue, 10 Nov 2026 17:14:01 -0500 Message-ID: <3034120.1794348841@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk David Rowley writes: > There's no public discussion about it, and I didn't think it critical > enough to open a new thread about. I believe the newly added > PG_PERL_TRY() macros would need a ##__VA_ARGS__ suffix on all the > local variables, else we'd get shadow warnings if we ever nested > PG_PERL_TRYs. We would get some warnings for that anyway, because we don't have the ability to change the name of the variable that Perl's dJMPENV macro creates. So I didn't bother for the variables that are specific to PG_PERL_TRY. The case I was mainly worried about was not gettimg shadow warnings for PG_PERL_TRY nested within PG_TRY, which is a pattern that exists now; so it's worth having the ##__VA_ARGS__ business on the variables that would conflict with PG_TRY. regards, tom lane