Commit fe21fcaf authored by Bruce Momjian's avatar Bruce Momjian

In psql, if the is no connection object, e.g. due to a server crash,

require all parameters for \c, rather than using the defaults, which
might be wrong.
parent 4c531693
......@@ -1512,6 +1512,12 @@ do_connect(char *dbname, char *user, char *host, char *port)
*n_conn;
char *password = NULL;
if (!o_conn && (!dbname || !user || !host || !port))
{
fputs(_("All connection parameters must be supplied because no database connection exists\n"), stderr);
return false;
}
if (!dbname)
dbname = PQdb(o_conn);
if (!user)
......
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