mirror of
https://github.com/postgres/postgres.git
synced 2025-05-01 01:04:50 +03:00
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:
parent
0b96fc977c
commit
468bed27ce
@ -190,8 +190,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);
|
||||
|
@ -54,8 +54,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");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user