mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-06 15:24:56 +08:00
Improve connectMaintenanceDatabase() error reporting.
The prior coding instructs the user to pick an alternative maintenance database, but this is overly clever, since it obscures whatever the real cause of the failure is. Josh Kupershmidt
This commit is contained in:
parent
aefa6d163e
commit
99081c63e4
@ -197,17 +197,7 @@ connectMaintenanceDatabase(const char *maintenance_db, const char *pghost,
|
||||
progname, true);
|
||||
if (!conn)
|
||||
conn = connectDatabase("template1", pghost, pgport, pguser,
|
||||
prompt_password, progname, true);
|
||||
|
||||
if (!conn)
|
||||
{
|
||||
fprintf(stderr, _("%s: could not connect to databases \"postgres\" or \"template1\"\n"
|
||||
"Please specify an alternative maintenance database.\n"),
|
||||
progname);
|
||||
fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
|
||||
progname);
|
||||
exit(1);
|
||||
}
|
||||
prompt_password, progname, false);
|
||||
|
||||
return conn;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user