mirror of
https://github.com/postgres/postgres.git
synced 2025-05-21 15:54:08 +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
bae31e75f7
commit
8096be2617
@ -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);
|
||||
|
@ -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");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user