Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfe21fca

Browse files
committed
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, whichmight be wrong.
1 parent4c53169 commitfe21fca

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎src/bin/psql/command.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1512,6 +1512,12 @@ do_connect(char *dbname, char *user, char *host, char *port)
15121512
*n_conn;
15131513
char*password=NULL;
15141514

1515+
if (!o_conn&& (!dbname|| !user|| !host|| !port))
1516+
{
1517+
fputs(_("All connection parameters must be supplied because no database connection exists\n"),stderr);
1518+
return false;
1519+
}
1520+
15151521
if (!dbname)
15161522
dbname=PQdb(o_conn);
15171523
if (!user)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp