diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c index 2cd3ab4cf72d48691a04f2bb9333a58fadd8bfca..205bb507fbc476fb7c63091d011b8a70e0ba7090 100644 --- a/src/bin/psql/command.c +++ b/src/bin/psql/command.c @@ -1514,6 +1514,11 @@ do_connect(char *dbname, char *user, char *host, char *port) if (!o_conn && (!dbname || !user || !host || !port)) { + /* + * We don't know the supplied connection parameters and don't want + * to connect to the wrong database by using defaults, so require + * all parameters to be specified. + */ fputs(_("All connection parameters must be supplied because no database connection exists\n"), stderr); return false; }