aboutsummaryrefslogtreecommitdiff
path: root/src/bin/psql/mainloop.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-03-18 18:03:12 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-03-18 18:03:12 +0000
commitf945f46193690841315b79f5961d3721c73621d9 (patch)
tree7ba6210215a7ca7fbf6dc6f13f3903db0bd45af8 /src/bin/psql/mainloop.c
parent2b23e864470fcd7ea29de7d96ff77ab969cf5b1c (diff)
downloadpostgresql-f945f46193690841315b79f5961d3721c73621d9.tar.gz
postgresql-f945f46193690841315b79f5961d3721c73621d9.zip
Modify lexing of multi-char operators per pghackers discussion around
16-Mar-00: trailing + or - is not part of the operator unless the operator also contains characters not present in SQL92-defined operators. This solves the 'X=-Y' problem without unduly constraining users' choice of operator names --- in particular, no existing Postgres operator names become invalid. Also, remove processing of // comments, as agreed in the same thread.
Diffstat (limited to 'src/bin/psql/mainloop.c')
-rw-r--r--src/bin/psql/mainloop.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/bin/psql/mainloop.c b/src/bin/psql/mainloop.c
index 4f71f3e4105..eadd50e94af 100644
--- a/src/bin/psql/mainloop.c
+++ b/src/bin/psql/mainloop.c
@@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.25 2000/03/13 13:46:32 petere Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.26 2000/03/18 18:03:11 tgl Exp $
*/
#include "postgres.h"
#include "mainloop.h"
@@ -318,8 +318,7 @@ MainLoop(FILE *source)
}
/* single-line comment? truncate line */
- else if ((line[i] == '-' && line[i + thislen] == '-') ||
- (line[i] == '/' && line[i + thislen] == '/'))
+ else if (line[i] == '-' && line[i + thislen] == '-')
{
line[i] = '\0'; /* remove comment */
break;