mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-27 08:39:28 +08:00
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 b03436994b
(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.
This commit is contained in:
parent
af527705ed
commit
8d645a116e
@ -3331,6 +3331,9 @@ printTable(const printTableContent *cont,
|
||||
is_local_pager = is_pager;
|
||||
}
|
||||
|
||||
/* clear any pre-existing error indication on the output stream */
|
||||
clearerr(fout);
|
||||
|
||||
/* print the stuff */
|
||||
|
||||
if (flog)
|
||||
|
Loading…
Reference in New Issue
Block a user