From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: robertmhaas@gmail.com
Cc: christoph.berg@credativ.de
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17504: psql --single-transaction -vON_ERROR_STOP=1 still commits after client-side error
Date: Wed, 15 Jun 2022 15:09:53 +0900
Message-ID: <Yql3sc3cvYvLlEHu@paquier.xyz> (raw)
In-Reply-To: <Yqfk6QSTJjUQodaD@paquier.xyz>
References: <2649417.1654875709@sss.pgh.pa.us>
<2656555.1654877531@sss.pgh.pa.us>
<Yqbc8bAdwnP02na4@paquier.xyz>
<20220613.160701.975499861789120736.horikyota.ntt@gmail.com>
<3791929.1655131936@sss.pgh.pa.us>
<Yqfk6QSTJjUQodaD@paquier.xyz>
On Tue, Jun 14, 2022 at 10:31:21AM +0900, Michael Paquier wrote:
> Okay, let's do so then on HEAD. I'll wait a bit more, in case others
> have an opinion to offer on the matter.
Well, done. One thing that I find a bit surprising in all that is the
lack of consistency in the handling of the return code of psql when
the last switch fails when not using ON_ERROR_STOP. For example, psql
fails if the last switch is a slash command from -c, but succeeds if
the last switch is a slash command in a file from -f that exists.
This comes down to the way failures are passed down from MainLoop() so
I am not sure if this is worth worrying about and nobody has
complained about that AFAIK, but I have added some extra tests to at
least document everything I could think about to track changes, in
case somebody plays with this code in the future.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
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-bugs@postgresql.org
Cc: michael@paquier.xyz, tgl@sss.pgh.pa.us, horikyota.ntt@gmail.com, robertmhaas@gmail.com, christoph.berg@credativ.de, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17504: psql --single-transaction -vON_ERROR_STOP=1 still commits after client-side error
In-Reply-To: <Yql3sc3cvYvLlEHu@paquier.xyz>
* 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