projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e94de2
)
Avoid crashing pg_dump if we can't connect to the database server, and
author
Neil Conway
<neilc@samurai.com>
Wed, 27 Jul 2005 05:15:03 +0000
(
05:15
+0000)
committer
Neil Conway
<neilc@samurai.com>
Wed, 27 Jul 2005 05:15:03 +0000
(
05:15
+0000)
no database has been explicitly specified. Per gripe from Omar Kilani.
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 9df17243aa1e6fdb552a298adbc461754039611e..b412cf0e0522abaa07995b40aae0eaf9954a59b5 100644
(file)
--- a/
src/bin/pg_dump/pg_backup_db.c
+++ b/
src/bin/pg_dump/pg_backup_db.c
@@
-267,7
+267,7
@@
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",
-
dbname
, PQerrorMessage(AH->connection));
+
PQdb(AH->connection)
, PQerrorMessage(AH->connection));
/* check for version mismatch */
_check_database_version(AH, ignoreVersion);