Commit 5ac4dcaa authored by Thomas G. Lockhart's avatar Thomas G. Lockhart

Fix parsing for <identifier>-<number> which was mis-identified as a unary

 minus. Example is SELECT f1-2 FROM INT4_TBL;
parent 6c1abf0d
This diff is collapsed.
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.35 1998/02/11 03:56:07 thomas Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.36 1998/02/18 07:22:40 thomas Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -311,6 +311,25 @@ other . ...@@ -311,6 +311,25 @@ other .
return (PARAM); return (PARAM);
} }
{identifier}/{space}*-{number} {
int i;
ScanKeyword *keyword;
BEGIN(xm);
for(i = 0; yytext[i]; i++)
if (isupper(yytext[i]))
yytext[i] = tolower(yytext[i]);
keyword = ScanKeywordLookup((char*)yytext);
if (keyword != NULL) {
return (keyword->value);
}
else
{
yylval.str = pstrdup((char*)yytext);
return (IDENT);
}
}
{integer}/{space}*-{number} { {integer}/{space}*-{number} {
char* endptr; char* endptr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment