|
3 | 3 | * |
4 | 4 | * Copyright 2000 by PostgreSQL Global Development Group |
5 | 5 | * |
6 | | - * $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.48 2001/03/22 04:00:18 momjian Exp $ |
| 6 | + * $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.49 2001/04/18 20:53:08 petere Exp $ |
7 | 7 | */ |
8 | 8 | #include "postgres_fe.h" |
9 | 9 | #include "command.h" |
@@ -139,7 +139,7 @@ HandleSlashCmds(const char *line, |
139 | 139 | new_cmd[0] = my_line[0]; |
140 | 140 | new_cmd[1] = '\0'; |
141 | 141 |
|
142 | | - status = exec_command(new_cmd, my_line + 1, &continue_parse, query_buf); |
| 142 | + status = exec_command(new_cmd, line + 1, &continue_parse, query_buf); |
143 | 143 |
|
144 | 144 | #if 0 /* turned out to be too annoying */ |
145 | 145 | if (status != CMD_UNKNOWN && isalpha((unsigned char) new_cmd[0])) |
@@ -1189,8 +1189,8 @@ unescape(const unsigned char *source, size_t len) |
1189 | 1189 | * The new user can be NULL. A db name of "-" is the same as the old one. |
1190 | 1190 | * (That is, the one currently in pset. But pset.db can also be NULL. A NULL |
1191 | 1191 | * dbname is handled by libpq.) |
1192 | | - * Returns true if all ok, false if the new connection couldn't be established |
1193 | | - * but the old one was set back. Otherwise it terminates the program. |
| 1192 | + * Returns true if all ok, false if the new connection couldn't be established. |
| 1193 | + * The old connection will be kept if the session is interactive. |
1194 | 1194 | */ |
1195 | 1195 | static bool |
1196 | 1196 | do_connect(const char *new_dbname, const char *new_user) |
|
0 commit comments