提交 5ac4dcaa 编写于 作者: T Thomas G. Lockhart

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

 minus. Example is SELECT f1-2 FROM INT4_TBL;
上级 6c1abf0d
此差异已折叠。
......@@ -8,7 +8,7 @@
*
*
* 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 .
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} {
char* endptr;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册