projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
697f5ca
)
Don't pass NULL to fprintf, if a bogus connection string is given to pg_dump.
author
Heikki Linnakangas
<
[email protected]
>
Wed, 20 Feb 2013 14:22:47 +0000
(16:22 +0200)
committer
Heikki Linnakangas
<
[email protected]
>
Wed, 20 Feb 2013 14:34:34 +0000
(16:34 +0200)
Back-patch to all supported branches.
src/bin/pg_dump/pg_backup_db.c
patch
|
blob
|
blame
|
history
diff --git
a/src/bin/pg_dump/pg_backup_db.c
b/src/bin/pg_dump/pg_backup_db.c
index b04784e0f9a648ef7a96bac7121d1812c8816d10..3bfcaf8db072c49f9f99df5b00878c2afe9f19c4 100644
(file)
--- a/
src/bin/pg_dump/pg_backup_db.c
+++ b/
src/bin/pg_dump/pg_backup_db.c
@@
-255,7
+255,8
@@
ConnectDatabase(Archive *AHX,
/* check to see that the backend connection was successfully made */
if (PQstatus(AH->connection) == CONNECTION_BAD)
die_horribly(AH, modulename, "connection to database \"%s\" failed: %s",
- PQdb(AH->connection), PQerrorMessage(AH->connection));
+ PQdb(AH->connection) ? PQdb(AH->connection) : "",
+ PQerrorMessage(AH->connection));
/* check for version mismatch */
_check_database_version(AH);