diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2020-11-07 22:15:52 +0100 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2020-11-07 22:45:07 +0100 |
commit | 8096be26178befa690841e449abb39e134f8d415 (patch) | |
tree | 662b597ae1e00aed0284fe168c37c9eadb3f2221 /src | |
parent | bae31e75f7777f2398eccbd40c5676e3dd487d1a (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/pg_basebackup/streamutil.c | 3 | ||||
-rw-r--r-- | src/bin/pg_rewind/libpq_fetch.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/bin/pg_basebackup/streamutil.c b/src/bin/pg_basebackup/streamutil.c index 8ef133d119c..1d59b5a4f00 100644 --- a/src/bin/pg_basebackup/streamutil.c +++ b/src/bin/pg_basebackup/streamutil.c @@ -193,8 +193,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 f599811411b..9344655f2b3 100644 --- a/src/bin/pg_rewind/libpq_fetch.c +++ b/src/bin/pg_rewind/libpq_fetch.c @@ -55,8 +55,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"); |