Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit f50dc2c

Browse files
committed
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 b034369 (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.
1 parent 092d3db commit f50dc2c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/fe_utils/print.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3347,6 +3347,9 @@ printTable(const printTableContent *cont,
33473347
is_local_pager = is_pager;
33483348
}
33493349

3350+
/* clear any pre-existing error indication on the output stream */
3351+
clearerr(fout);
3352+
33503353
/* print the stuff */
33513354

33523355
if (flog)

0 commit comments

Comments
 (0)