aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/libpq.sgml13
-rw-r--r--doc/src/sgml/lobj.sgml3
2 files changed, 6 insertions, 10 deletions
diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index b22cb38ca3b..b7a82453f0d 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -6837,8 +6837,8 @@ main(void)
if (PQstatus(conn) != CONNECTION_OK)
{
- fprintf(stderr, "Connection to database failed: %s",
- PQerrorMessage(conn));
+ /* PQerrorMessage's result includes a trailing newline */
+ fprintf(stderr, "%s", PQerrorMessage(conn));
PQfinish(conn);
return 1;
}
@@ -8296,8 +8296,7 @@ main(int argc, char **argv)
/* Check to see that the backend connection was successfully made */
if (PQstatus(conn) != CONNECTION_OK)
{
- fprintf(stderr, "Connection to database failed: %s",
- PQerrorMessage(conn));
+ fprintf(stderr, "%s", PQerrorMessage(conn));
exit_nicely(conn);
}
@@ -8466,8 +8465,7 @@ main(int argc, char **argv)
/* Check to see that the backend connection was successfully made */
if (PQstatus(conn) != CONNECTION_OK)
{
- fprintf(stderr, "Connection to database failed: %s",
- PQerrorMessage(conn));
+ fprintf(stderr, "%s", PQerrorMessage(conn));
exit_nicely(conn);
}
@@ -8694,8 +8692,7 @@ main(int argc, char **argv)
/* Check to see that the backend connection was successfully made */
if (PQstatus(conn) != CONNECTION_OK)
{
- fprintf(stderr, "Connection to database failed: %s",
- PQerrorMessage(conn));
+ fprintf(stderr, "%s", PQerrorMessage(conn));
exit_nicely(conn);
}
diff --git a/doc/src/sgml/lobj.sgml b/doc/src/sgml/lobj.sgml
index 413eda50af3..6d46da42e27 100644
--- a/doc/src/sgml/lobj.sgml
+++ b/doc/src/sgml/lobj.sgml
@@ -939,8 +939,7 @@ main(int argc, char **argv)
/* check to see that the backend connection was successfully made */
if (PQstatus(conn) != CONNECTION_OK)
{
- fprintf(stderr, "Connection to database failed: %s",
- PQerrorMessage(conn));
+ fprintf(stderr, "%s", PQerrorMessage(conn));
exit_nicely(conn);
}