Skip to content

Commit 99081c6

Browse files
committed
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
1 parent aefa6d1 commit 99081c6

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/bin/scripts/common.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -197,17 +197,7 @@ connectMaintenanceDatabase(const char *maintenance_db, const char *pghost,
197197
progname, true);
198198
if (!conn)
199199
conn = connectDatabase("template1", pghost, pgport, pguser,
200-
prompt_password, progname, true);
201-
202-
if (!conn)
203-
{
204-
fprintf(stderr, _("%s: could not connect to databases \"postgres\" or \"template1\"\n"
205-
"Please specify an alternative maintenance database.\n"),
206-
progname);
207-
fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
208-
progname);
209-
exit(1);
210-
}
200+
prompt_password, progname, false);
211201

212202
return conn;
213203
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy