mirror of
https://github.com/postgres/postgres.git
synced 2026-04-14 05:27:20 -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
b5ec56f664
commit
5c97528df0
1 changed files with 2 additions and 1 deletions
|
|
@ -301,7 +301,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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue