mirror of
https://github.com/postgres/postgres.git
synced 2025-05-02 11:44: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)
|
if (PQstatus(tmpconn) != CONNECTION_OK)
|
||||||
{
|
{
|
||||||
fprintf(stderr, _("%s: could not connect to server: %s"),
|
fprintf(stderr, _("%s: %s"), progname, PQerrorMessage(tmpconn));
|
||||||
progname, PQerrorMessage(tmpconn));
|
|
||||||
PQfinish(tmpconn);
|
PQfinish(tmpconn);
|
||||||
free(values);
|
free(values);
|
||||||
free(keywords);
|
free(keywords);
|
||||||
|
@ -54,8 +54,7 @@ libpqConnect(const char *connstr)
|
|||||||
|
|
||||||
conn = PQconnectdb(connstr);
|
conn = PQconnectdb(connstr);
|
||||||
if (PQstatus(conn) == CONNECTION_BAD)
|
if (PQstatus(conn) == CONNECTION_BAD)
|
||||||
pg_fatal("could not connect to server: %s",
|
pg_fatal("%s", PQerrorMessage(conn));
|
||||||
PQerrorMessage(conn));
|
|
||||||
|
|
||||||
pg_log(PG_PROGRESS, "connected to server\n");
|
pg_log(PG_PROGRESS, "connected to server\n");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user