Commit 99081c63 authored by Robert Haas's avatar Robert Haas

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
parent aefa6d16
...@@ -197,17 +197,7 @@ connectMaintenanceDatabase(const char *maintenance_db, const char *pghost, ...@@ -197,17 +197,7 @@ connectMaintenanceDatabase(const char *maintenance_db, const char *pghost,
progname, true); progname, true);
if (!conn) if (!conn)
conn = connectDatabase("template1", pghost, pgport, pguser, conn = connectDatabase("template1", pghost, pgport, pguser,
prompt_password, progname, true); prompt_password, progname, false);
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);
}
return conn; return conn;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment