diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2013-07-15 20:04:14 -0400 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2013-07-15 20:04:14 -0400 |
commit | 233bfe06735411f08d231764dfd3a6fcf7aef9a3 (patch) | |
tree | a92efd3ebdcc104cd01fe64137ab74b221ac4f94 | |
parent | 4ed22e891f9915b02b753ee8763a8f2438234fc6 (diff) | |
download | postgresql-233bfe06735411f08d231764dfd3a6fcf7aef9a3.tar.gz postgresql-233bfe06735411f08d231764dfd3a6fcf7aef9a3.zip |
Fix PQconninfoParse error message handling
The returned error message already includes a newline, but the callers
were adding their own when printing it out.
-rw-r--r-- | src/bin/pg_basebackup/streamutil.c | 2 | ||||
-rw-r--r-- | src/bin/pg_dump/pg_dumpall.c | 2 | ||||
-rw-r--r-- | src/bin/scripts/pg_isready.c | 2 | ||||
-rw-r--r-- | src/interfaces/libpq/test/uri-regress.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/bin/pg_basebackup/streamutil.c b/src/bin/pg_basebackup/streamutil.c index dab0e5470cf..1dfb80f4a72 100644 --- a/src/bin/pg_basebackup/streamutil.c +++ b/src/bin/pg_basebackup/streamutil.c @@ -56,7 +56,7 @@ GetConnection(void) conn_opts = PQconninfoParse(connection_string, &err_msg); if (conn_opts == NULL) { - fprintf(stderr, "%s: %s\n", progname, err_msg); + fprintf(stderr, "%s: %s", progname, err_msg); exit(1); } diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c index 78f702f8973..12533073d81 100644 --- a/src/bin/pg_dump/pg_dumpall.c +++ b/src/bin/pg_dump/pg_dumpall.c @@ -1752,7 +1752,7 @@ connectDatabase(const char *dbname, const char *connection_string, conn_opts = PQconninfoParse(connection_string, &err_msg); if (conn_opts == NULL) { - fprintf(stderr, "%s: %s\n", progname, err_msg); + fprintf(stderr, "%s: %s", progname, err_msg); exit_nicely(1); } diff --git a/src/bin/scripts/pg_isready.c b/src/bin/scripts/pg_isready.c index 5cb75a42ec0..d27ccea70fb 100644 --- a/src/bin/scripts/pg_isready.c +++ b/src/bin/scripts/pg_isready.c @@ -135,7 +135,7 @@ main(int argc, char **argv) opts = PQconninfoParse(pgdbname, &errmsg); if (opts == NULL) { - fprintf(stderr, _("%s: %s\n"), progname, errmsg); + fprintf(stderr, _("%s: %s"), progname, errmsg); exit(PQPING_NO_ATTEMPT); } } diff --git a/src/interfaces/libpq/test/uri-regress.c b/src/interfaces/libpq/test/uri-regress.c index 6e1e3506fce..00acd64a5f0 100644 --- a/src/interfaces/libpq/test/uri-regress.c +++ b/src/interfaces/libpq/test/uri-regress.c @@ -33,7 +33,7 @@ main(int argc, char *argv[]) opts = PQconninfoParse(argv[1], &errmsg); if (opts == NULL) { - fprintf(stderr, "uri-regress: %s\n", errmsg); + fprintf(stderr, "uri-regress: %s", errmsg); return 1; } |