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 8096be2

Browse filesBrowse files
committed
Fix redundant error messages in client tools
A few client tools duplicate error messages already provided by libpq. Discussion: https://www.postgresql.org/message-id/flat/3e937641-88a1-e697-612e-99bba4b8e5e4%40enterprisedb.com
1 parent bae31e7 commit 8096be2
Copy full SHA for 8096be2

File tree

Expand file treeCollapse file tree

2 files changed

+2
-4
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+2
-4
lines changed

‎src/bin/pg_basebackup/streamutil.c

Copy file name to clipboardExpand all lines: src/bin/pg_basebackup/streamutil.c
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,7 @@ GetConnection(void)
193193

194194
if (PQstatus(tmpconn) != CONNECTION_OK)
195195
{
196-
fprintf(stderr, _("%s: could not connect to server: %s"),
197-
progname, PQerrorMessage(tmpconn));
196+
fprintf(stderr, _("%s: %s"), progname, PQerrorMessage(tmpconn));
198197
PQfinish(tmpconn);
199198
free(values);
200199
free(keywords);

‎src/bin/pg_rewind/libpq_fetch.c

Copy file name to clipboardExpand all lines: src/bin/pg_rewind/libpq_fetch.c
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ libpqConnect(const char *connstr)
5555

5656
conn = PQconnectdb(connstr);
5757
if (PQstatus(conn) == CONNECTION_BAD)
58-
pg_fatal("could not connect to server: %s",
59-
PQerrorMessage(conn));
58+
pg_fatal("%s", PQerrorMessage(conn));
6059

6160
pg_log(PG_PROGRESS, "connected to server\n");
6261

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.