pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andres Freund <andres@anarazel.de>
Cc: Xing Guo <higuoxing@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: PL/Python: Fix return in the middle of PG_TRY() block.
Date: Thu, 4 May 2023 16:42:35 -0700
Message-ID: <20230504234235.GA2419591@nathanxps13> (raw)
In-Reply-To: <3200088.1683203943@sss.pgh.pa.us>
References: <CACpMh+D9jz4Lq3qieoU2NkhGASqekhDXnXX2USW4mHa+SWNQag@mail.gmail.com>
	<1864041.1673882943@sss.pgh.pa.us>
	<20230120010711.jpqbaelpgmuvt2vq@awork3.anarazel.de>
	<20230120190201.GC4106863@nathanxps13>
	<20230503202116.GA2110623@nathanxps13>
	<3012766.1683146012@sss.pgh.pa.us>
	<20230503205838.GA2112379@nathanxps13>
	<20230504045413.GA2202617@nathanxps13>
	<20230504050108.GA2203557@nathanxps13>
	<3200088.1683203943@sss.pgh.pa.us>

On Thu, May 04, 2023 at 08:39:03AM -0400, Tom Lane wrote:
> Hmm, I'm not sure why PLy_trigger_build_args's pltargs needs to
> gain a "volatile" here?  LGTM otherwise.

I removed that new "volatile" marker before committing.  I was trying to
future-proof a bit and follow elog.h's recommendation to the letter, but
following your mental model upthread, it doesn't seem to be strictly
necessary, and we'd need to set pltargs to NULL after decrementing its
reference count in the PG_TRY section for such future-proofing to be
effective, anyway.

Thank you for reviewing!

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com





view thread (20+ messages)  latest in thread

Message-ID: <20230504234235.GA2419591@nathanxps13>
Permalink:  ../20230504234235.GA2419591@nathanxps13/
Also on:    postgresql.org/message-id/20230504234235.GA2419591@nathanxps13

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: nathandbossart@gmail.com, tgl@sss.pgh.pa.us, andres@anarazel.de, higuoxing@gmail.com
  Subject: Re: PL/Python: Fix return in the middle of PG_TRY() block.
  In-Reply-To: <20230504234235.GA2419591@nathanxps13>

* 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