git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4ed22e8)
Fix PQconninfoParse error message handling
2013年7月16日 00:04:14 +0000 (20:04 -0400)
2013年7月16日 00:04:14 +0000 (20:04 -0400)
The returned error message already includes a newline, but the callers
were adding their own when printing it out.


diff --git a/src/bin/pg_basebackup/streamutil.c b/src/bin/pg_basebackup/streamutil.c
index dab0e5470cfb7d308b53205f7a2890c64d35fd78..1dfb80f4a72a5e3d6e2fada9d24e25f8e6f93829 100644 (file)
--- 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 78f702f897309511218b019a7dd99fac9e92b597..12533073d810894afef1afc8fa2431b3d5e894cd 100644 (file)
--- 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 5cb75a42ec01220b7c2d49e0c953ffe26406cd83..d27ccea70fbf3626eb4ff3440f6595e0b79c53d8 100644 (file)
--- 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 6e1e3506fce836960ae01b1ee3cce387afac8ece..00acd64a5f0f6a0f5ba02da2b44467974fd6475f 100644 (file)
--- 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;
}
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /