Re: libpq async duplicate error results - Mailing list pgsql-hackers

From Tom Lane
Subject Re: libpq async duplicate error results
Date
Msg-id 1262938.1645658107@sss.pgh.pa.us
Whole thread Raw
In response to Re: libpq async duplicate error results  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: libpq async duplicate error results
List pgsql-hackers
I wrote:
> However ... in the wake of 618c16707, I wonder if we should consider
> an alternative definition, which is to NOT clear errorMessage when
> starting a new pipelined query.  (That would be this patch minus
> the addition to pqPipelineProcessQueue.)  Thanks to 618c16707,
> the returned error PGresult(s) should bear exactly the same contents
> either way.  What would change is that PQerrorMessage(conn) would return
> the concatenation of all errors that have occurred during the current
> pipeline sequence.  I think that's arguably a more useful definition
> than what we have now --- though obviously it'd require a docs change.
> It seems to fit with the spirit of the v14 changes to ensure that
> PQerrorMessage tells you about everything that happened during a
> failed connection attempt, not only the last thing.

After studying the pipeline mode some more, I no longer think that's
a great idea.  ISTM we want pipeline mode to act as nearly as possible
the same as issuing the same series of queries non-pipelined.   But
this redefinition would make it different.  So, barring objection,
I'll push that cleanup patch as-posted.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: convert libpq uri-regress tests to tap test
Next
From: Jacob Champion
Date:
Subject: Re: [PATCH] Enable SSL library detection via PQsslAttribute