public inbox for [email protected]  
help / color / mirror / Atom feed
From: Peter Eisentraut <[email protected]>
To: Fabien COELHO <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: psql - add SHOW_ALL_RESULTS option
Date: Mon, 3 Jan 2022 17:35:31 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2112230703530.2668598@pseudo>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<alpine.DEB.2.22.394.2104151336060.191178@pseudo>
	<[email protected]>
	<alpine.DEB.2.22.394.2106121130400.4105466@pseudo>
	<CALDaNm0+pzGgp-M1mAoUVYRtjadbWYuB96J8RaV9iH3+HA8FTA@mail.gmail.com>
	<alpine.DEB.2.22.394.2107151742300.1705285@pseudo>
	<[email protected]>
	<alpine.DEB.2.22.394.2107221655020.25741@pseudo>
	<[email protected]>
	<alpine.DEB.2.22.394.2109251058000.3216312@pseudo>
	<alpine.DEB.2.22.394.2110021622530.2817726@pseudo>
	<[email protected]>
	<alpine.DEB.2.22.394.2112230703530.2668598@pseudo>

On 23.12.21 12:40, Fabien COELHO wrote:
> This is also a feature/bug of libpq which happens to be hidden by 
> PQexec: when one command crashes PQgetResult actually returns *2* 
> results. First one with the FATAL message, second one when libpq figures 
> out that the connection was lost with the second message appended to the 
> first. PQexec just happen to silently ignore the first result. I added a 
> manual reset of the error message when first shown so that it is not 
> shown twice. It is unclear to me whether the reset should be somewhere 
> in libpq instead. I added a voluntary crash at the end of the psql test.

With this "voluntary crash", the regression test output is now

      psql                         ... ok     (test process exited with 
exit code 2)      281 ms

Normally, I'd expect this during development if there was a crash 
somewhere, but showing this during a normal run now, and moreover still 
saying "ok", is quite weird and confusing.  Maybe this type of test 
should be done in the TAP framework instead.






view thread (2+ messages)

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: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: psql - add SHOW_ALL_RESULTS option
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox