File tree 3 files changed +3
-45
lines changed
3 files changed +3
-45
lines changed Original file line number Diff line number Diff line change 3
3
*
4
4
* Copyright (c) 2000-2008, PostgreSQL Global Development Group
5
5
*
6
- * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.186 2008/01/01 19:45:55 momjian Exp $
6
+ * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.187 2008/05/02 09:27:50 petere Exp $
7
7
*/
8
8
#include "postgres_fe.h"
9
9
#include "command.h"
@@ -90,30 +90,6 @@ HandleSlashCmds(PsqlScanState scan_state,
90
90
/* And try to execute it */
91
91
status = exec_command (cmd , scan_state , query_buf );
92
92
93
- if (status == PSQL_CMD_UNKNOWN && strlen (cmd ) > 1 )
94
- {
95
- /*
96
- * If the command was not recognized, try to parse it as a one-letter
97
- * command with immediately following argument (a still-supported, but
98
- * no longer encouraged, syntax).
99
- */
100
- char new_cmd [2 ];
101
-
102
- /* don't change cmd until we know it's okay */
103
- new_cmd [0 ] = cmd [0 ];
104
- new_cmd [1 ] = '\0' ;
105
-
106
- psql_scan_slash_pushback (scan_state , cmd + 1 );
107
-
108
- status = exec_command (new_cmd , scan_state , query_buf );
109
-
110
- if (status != PSQL_CMD_UNKNOWN )
111
- {
112
- /* adjust cmd for possible messages below */
113
- cmd [1 ] = '\0' ;
114
- }
115
- }
116
-
117
93
if (status == PSQL_CMD_UNKNOWN )
118
94
{
119
95
if (pset .cur_cmd_interactive )
Original file line number Diff line number Diff line change 3
3
*
4
4
* Copyright (c) 2000-2008, PostgreSQL Global Development Group
5
5
*
6
- * $PostgreSQL: pgsql/src/bin/psql/psqlscan.h,v 1.8 2008/01/01 19:45:56 momjian Exp $
6
+ * $PostgreSQL: pgsql/src/bin/psql/psqlscan.h,v 1.9 2008/05/02 09:27:51 petere Exp $
7
7
*/
8
8
#ifndef PSQLSCAN_H
9
9
#define PSQLSCAN_H
@@ -61,6 +61,4 @@ extern char *psql_scan_slash_option(PsqlScanState state,
61
61
62
62
extern void psql_scan_slash_command_end (PsqlScanState state );
63
63
64
- extern void psql_scan_slash_pushback (PsqlScanState state , const char * str );
65
-
66
64
#endif /* PSQLSCAN_H */
Original file line number Diff line number Diff line change 33
33
* Portions Copyright (c) 1994, Regents of the University of California
34
34
*
35
35
* IDENTIFICATION
36
- * $PostgreSQL: pgsql/src/bin/psql/psqlscan.l,v 1.23 2008/01/01 19:45:56 momjian Exp $
36
+ * $PostgreSQL: pgsql/src/bin/psql/psqlscan.l,v 1.24 2008/05/02 09:27:51 petere Exp $
37
37
*
38
38
*-------------------------------------------------------------------------
39
39
*/
@@ -1525,22 +1525,6 @@ psql_scan_slash_command_end(PsqlScanState state)
1525
1525
/* There are no possible errors in this lex state... */
1526
1526
}
1527
1527
1528
- /*
1529
- * "Push back" the passed string so that it will be rescanned by subsequent
1530
- * psql_scan_slash_option calls. This is presently only used in the case
1531
- * where a single-letter command has been concatenated with its argument.
1532
- *
1533
- * We use the same buffer stack mechanism as for variable expansion.
1534
- */
1535
- void
1536
- psql_scan_slash_pushback (PsqlScanState state, const char *str)
1537
- {
1538
- /* needed for push_new_buffer */
1539
- cur_state = state;
1540
-
1541
- push_new_buffer (str);
1542
- }
1543
-
1544
1528
1545
1529
/*
1546
1530
* Push the given string onto the stack of stuff to scan.
You can’t perform that action at this time.
0 commit comments