mirror of
https://github.com/postgres/postgres.git
synced 2025-06-17 00:02:17 -04:00
Don't pass NULL to fprintf, if a bogus connection string is given to pg_dump.
Back-patch to all supported branches.
This commit is contained in:
parent
f73a16340c
commit
23ef96327f
@ -305,7 +305,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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user