Re: libpq async duplicate error results

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Fabien COELHO <coelho@cri.ensmp.fr>, Alvaro Herrera <alvherre@alvh.no-ip.org>, Peter Eisentraut <peter.eisentraut@enterprisedb.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-02-17T02:12:12Z
Lists: pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2022-02-16 20:28:02 -0500, Tom Lane wrote:
>> Uh ... then we'd have to cast away the const to do free().

> I was just thinking of
> if ((const PGresult *) res == &OOM_result)

Oh, I see.  Sure, can do it like that.

			regards, tom lane



Commits

  1. libpq: drop pending pipelined commands in pqDropConnection().

  2. Adjust interaction of libpq pipeline mode with errorMessage resets.

  3. Rearrange libpq's error reporting to avoid duplicated error text.

  4. In libpq, always append new error messages to conn->errorMessage.