From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Rowley <dgrowleyml@gmail.com>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Add optional parameter to PG_TRY() macros
Date: Tue, 10 Nov 2026 17:14:01 -0500
Message-ID: <3034120.1794348841@sss.pgh.pa.us> (raw)
In-Reply-To: <CAApHDvrCOdLJbGc8MJdzmD3V_H7U+8X9JcXOkwLg7WRrkxzG_A@mail.gmail.com>
References: <E1xQt8u-00000000DmQ-10W5@gemulon.postgresql.org>
<CAApHDvrCOdLJbGc8MJdzmD3V_H7U+8X9JcXOkwLg7WRrkxzG_A@mail.gmail.com>
David Rowley <dgrowleyml@gmail.com> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, dgrowleyml@gmail.com
Subject: Re: pgsql: Add optional parameter to PG_TRY() macros
In-Reply-To: <3034120.1794348841@sss.pgh.pa.us>
References: <E1xQt8u-00000000DmQ-10W5@gemulon.postgresql.org> <CAApHDvrCOdLJbGc8MJdzmD3V_H7U+8X9JcXOkwLg7WRrkxzG_A@mail.gmail.com> <3034120.1794348841@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox