aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2012-03-21 10:56:26 -0400
committerRobert Haas <rhaas@postgresql.org>2012-03-21 10:56:26 -0400
commit99081c63e40ac6e33c83406b0958aa9426193fea (patch)
tree824109a989c76840eab37b9b924ee5184e013069
parentaefa6d163e21391626c20a508af33373d6ba387e (diff)
downloadpostgresql-99081c63e40ac6e33c83406b0958aa9426193fea.tar.gz
postgresql-99081c63e40ac6e33c83406b0958aa9426193fea.zip
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
-rw-r--r--src/bin/scripts/common.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/bin/scripts/common.c b/src/bin/scripts/common.c
index 1a5284e5264..5406a98c838 100644
--- a/src/bin/scripts/common.c
+++ b/src/bin/scripts/common.c
@@ -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;
}