aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2020-11-07 22:15:52 +0100
committerPeter Eisentraut <peter@eisentraut.org>2020-11-07 22:44:15 +0100
commit42c088be18894234fdd47dae48aab0e3db703b42 (patch)
treed4d15c50ff1e7017e146e3d85ee70f69c5090e74
parent895d0f0e821805e3f2b9eb848fc11ea5df77dbaf (diff)
downloadpostgresql-42c088be18894234fdd47dae48aab0e3db703b42.tar.gz
postgresql-42c088be18894234fdd47dae48aab0e3db703b42.zip
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
-rw-r--r--src/bin/pg_basebackup/streamutil.c3
-rw-r--r--src/bin/pg_rewind/libpq_fetch.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/src/bin/pg_basebackup/streamutil.c b/src/bin/pg_basebackup/streamutil.c
index e9a2739f8e2..9309a8de955 100644
--- a/src/bin/pg_basebackup/streamutil.c
+++ b/src/bin/pg_basebackup/streamutil.c
@@ -201,8 +201,7 @@ GetConnection(void)
if (PQstatus(tmpconn) != CONNECTION_OK)
{
- fprintf(stderr, _("%s: could not connect to server: %s"),
- progname, PQerrorMessage(tmpconn));
+ fprintf(stderr, _("%s: %s"), progname, PQerrorMessage(tmpconn));
PQfinish(tmpconn);
free(values);
free(keywords);
diff --git a/src/bin/pg_rewind/libpq_fetch.c b/src/bin/pg_rewind/libpq_fetch.c
index fea7a221390..361565d8612 100644
--- a/src/bin/pg_rewind/libpq_fetch.c
+++ b/src/bin/pg_rewind/libpq_fetch.c
@@ -50,8 +50,7 @@ libpqConnect(const char *connstr)
conn = PQconnectdb(connstr);
if (PQstatus(conn) == CONNECTION_BAD)
- pg_fatal("could not connect to server: %s",
- PQerrorMessage(conn));
+ pg_fatal("%s", PQerrorMessage(conn));
pg_log(PG_PROGRESS, "connected to server\n");