aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2001-05-12 17:37:15 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2001-05-12 17:37:15 +0000
commit02549a2d2c6a7ffc6188fc113c695886308ecfa5 (patch)
treeaf17f0c930bc6f8079524dd5ee900ad0bec42f26
parent2e1579a99f685cb6858eb7995b281a563ba67eec (diff)
downloadpostgresql-02549a2d2c6a7ffc6188fc113c695886308ecfa5.tar.gz
postgresql-02549a2d2c6a7ffc6188fc113c695886308ecfa5.zip
Add comment to explain need for bizarre-looking coding in HandleSlashCmds.
-rw-r--r--src/bin/psql/command.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c
index 966fbaafe4f..7604cccbd00 100644
--- a/src/bin/psql/command.c
+++ b/src/bin/psql/command.c
@@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.52 2001/05/09 17:29:10 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.53 2001/05/12 17:37:15 tgl Exp $
*/
#include "postgres_fe.h"
#include "command.h"
@@ -132,16 +132,16 @@ HandleSlashCmds(const char *line,
{
/*
- * If the command was not recognized, try inserting a space after
- * the first letter and call again. The one letter commands allow
- * arguments to start immediately after the command, but that is
- * no longer encouraged.
+ * 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];
new_cmd[0] = my_line[0];
new_cmd[1] = '\0';
+ /* use line for options, because my_line was clobbered above */
status = exec_command(new_cmd, line + 1, &continue_parse, query_buf);
/* continue_parse must be relative to my_line for calculation below */