Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f50dc2c

Browse filesBrowse 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
Copy full SHA for f50dc2c

File tree

Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed

‎src/fe_utils/print.c

Copy file name to clipboardExpand all lines: src/fe_utils/print.c
+3Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.