pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: libpq async duplicate error results
Date: Wed, 16 Feb 2022 20:28:02 -0500
Message-ID: <3518938.1645061282@sss.pgh.pa.us> (raw)
In-Reply-To: <20220217011109.edkms5f2iqr3ofmv@alap3.anarazel.de>
References: <ab4288f8-be5c-57fb-2400-e3e857f53e46@enterprisedb.com>
	<22d52a5b-31ce-d951-1f5f-3403d793cec3@enterprisedb.com>
	<269608.1643904273@sss.pgh.pa.us>
	<alpine.DEB.2.22.394.2202060750100.625150@pseudo>
	<979911.1644253651@sss.pgh.pa.us>
	<3510062.1645055497@sss.pgh.pa.us>
	<20220217011109.edkms5f2iqr3ofmv@alap3.anarazel.de>

Andres Freund <andres@anarazel.de> writes:
> On 2022-02-16 18:51:37 -0500, Tom Lane wrote:
>> +	/* Also, do nothing if the argument is OOM_result */
>> +	if (res == unconstify(PGresult *, &OOM_result))
>> +		return;

> Wouldn't it make more sense to make res const, rather than unconstifying
> &OOM_result?

Uh ... then we'd have to cast away the const to do free().

			regards, tom lane





view thread (19+ messages)  latest in thread

Message-ID: <3518938.1645061282@sss.pgh.pa.us>
Permalink:  ../3518938.1645061282@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3518938.1645061282@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, andres@anarazel.de, coelho@cri.ensmp.fr, alvherre@alvh.no-ip.org, peter.eisentraut@enterprisedb.com
  Subject: Re: libpq async duplicate error results
  In-Reply-To: <3518938.1645061282@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