1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-11 10:01:57 +03:00

No \\connect with usernames AND passwords.

This commit is contained in:
Bruce Momjian
1997-09-12 21:58:03 +00:00
parent cf5a8723dd
commit 2d7023c8fb

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.93 1997/09/08 21:50:14 momjian Exp $ * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.94 1997/09/12 21:58:03 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -1009,6 +1009,8 @@ do_connect(const char *new_dbname,
{ {
if (!new_dbname) if (!new_dbname)
fprintf(stderr, "\\connect must be followed by a database name\n"); fprintf(stderr, "\\connect must be followed by a database name\n");
else if (new_user != NULL && settings.getPassword)
fprintf(stderr, "You can't specify a username when using passwords.\n");
else else
{ {
PGconn *olddb = settings->db; PGconn *olddb = settings->db;