Re: libpq async duplicate error results

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: libpq async duplicate error results
Date: 2022-02-17 01:28:02
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Andres Freund <andres(at)anarazel(dot)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

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2022-02-17 01:38:00 Re: Small TAP tests cleanup for Windows and unused modules
Previous Message Tom Lane 2022-02-17 01:22:23 Re: Race conditions in