projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d6899d
)
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:33:24 +0000
(16:33 +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 21c203e8e7b903732eadb69eb75e9b71a571bcca..4c4f24f7d5abd46e72b33cf6ef068f3933a0f1b6 100644
(file)
--- a/
src/bin/pg_dump/pg_backup_db.c
+++ b/
src/bin/pg_dump/pg_backup_db.c
@@
-300,7
+300,8
@@
ConnectDatabase(Archive *AHX,
/* check to see that the backend connection was successfully made */
if (PQstatus(AH->connection) == CONNECTION_BAD)
exit_horribly(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);