pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: psql: call clearerr() just before printing
Date: Mon, 29 Mar 2021 21:45:48 +0000
Message-ID: <E1lQzhk-0002w2-MN@gemulon.postgresql.org> (raw)

psql: call clearerr() just before printing

We were never doing clearerr() on the output stream, which results in a
message being printed after each result once an EOF is seen:

could not print result table: Success

This message was added by commit b03436994bcc (in the pg13 era); before
that, the error indicator would never be examined.  So backpatch only
that far back, even though the actual bug (to wit: the fact that the
error indicator is never cleared) is older.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8d645a116ef6e04bfb03e259149b8e163dbdf50c

Modified Files
--------------
src/fe_utils/print.c | 3 +++
1 file changed, 3 insertions(+)



view thread (2+ messages)

Message-ID: <E1lQzhk-0002w2-MN@gemulon.postgresql.org>
Permalink:  ../E1lQzhk-0002w2-MN@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lQzhk-0002w2-MN@gemulon.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: alvherre@alvh.no-ip.org
  Subject: Re: pgsql: psql: call clearerr() just before printing
  In-Reply-To: <E1lQzhk-0002w2-MN@gemulon.postgresql.org>
  References: <E1lQzhk-0002w2-MN@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