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
This commit is contained in:
Peter Eisentraut 2020-11-07 22:15:52 +01:00
parent d2d3a4bd33
commit 24bbdaa6fe
2 changed files with 2 additions and 4 deletions

View File

@ -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);

View File

@ -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");