From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: psql: Fix incorrect status code returned by \getresults
Date: Sat, 19 Apr 2025 23:16:24 +0000
Message-ID: <E1u6HQ7-000rgl-2F@gemulon.postgresql.org> (raw)
psql: Fix incorrect status code returned by \getresults
When an invalid number of results is requested for \getresults, the
status code returned by exec_command_getresults() was PSQL_CMD_SKIP_LINE
and not PSQL_CMD_ERROR.
This led to incorrect behaviors, with ON_ERROR_STOP for example.
Reported-by: Noah Misch <noah@leadboat.com>
Discussion: https://postgr.es/m/20250415213450.1f.nmisch@google.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/5ee7bd944ee812e988a7dee52613ee1c80c13579
Modified Files
--------------
src/bin/psql/command.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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-committers@postgresql.org
Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: psql: Fix incorrect status code returned by \getresults
In-Reply-To: <E1u6HQ7-000rgl-2F@gemulon.postgresql.org>
* 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