summaryrefslogtreecommitdiff
path: root/src/bin/psql/command.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2008-05-02 09:27:51 +0000
committerPeter Eisentraut <peter_e@gmx.net>2008-05-02 09:27:51 +0000
commit6f093f3825d13bc5ad41a64bf2f5251c5b62395b (patch)
tree269d913d8d60b3aa45f5adb9a08a582aa71b58b6 /src/bin/psql/command.c
parent170e331c6346e7105270559430878d580f8ac2fd (diff)
One-letter backslash commands now need a space before the first argument.
This has been the only documented and encouraged syntax for a long time, and with extension facilities such as aliases being proposed, it is a good time to clean up the legacy syntax a bit. Author: Bernd Helmle <mailings@oopsware.de>
Diffstat (limited to 'src/bin/psql/command.c')
-rw-r--r--src/bin/psql/command.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c
index 3e6f1bc58f0..28a14c7d0ae 100644
--- a/src/bin/psql/command.c
+++ b/src/bin/psql/command.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2008, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.186 2008/01/01 19:45:55 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.187 2008/05/02 09:27:50 petere Exp $
*/
#include "postgres_fe.h"
#include "command.h"
@@ -90,30 +90,6 @@ HandleSlashCmds(PsqlScanState scan_state,
/* And try to execute it */
status = exec_command(cmd, scan_state, query_buf);
- if (status == PSQL_CMD_UNKNOWN && strlen(cmd) > 1)
- {
- /*
- * If the command was not recognized, try to parse it as a one-letter
- * command with immediately following argument (a still-supported, but
- * no longer encouraged, syntax).
- */
- char new_cmd[2];
-
- /* don't change cmd until we know it's okay */
- new_cmd[0] = cmd[0];
- new_cmd[1] = '\0';
-
- psql_scan_slash_pushback(scan_state, cmd + 1);
-
- status = exec_command(new_cmd, scan_state, query_buf);
-
- if (status != PSQL_CMD_UNKNOWN)
- {
- /* adjust cmd for possible messages below */
- cmd[1] = '\0';
- }
- }
-
if (status == PSQL_CMD_UNKNOWN)
{
if (pset.cur_cmd_interactive)