1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

Fix scanner name length trimming.

This commit is contained in:
Bruce Momjian
1998-08-29 05:27:17 +00:00
parent 53916cab6a
commit 2618fcdf0d
2 changed files with 8 additions and 6 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.41 1998/08/29 02:36:18 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.42 1998/08/29 05:27:17 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -323,8 +323,8 @@ other .
if (isascii((unsigned char)yytext[i]) &&
isupper(yytext[i]))
yytext[i] = tolower(yytext[i]);
if (i > NAMEDATALEN)
yytext[NAMEDATALEN] = '\0';
if (i >= NAMEDATALEN)
yytext[NAMEDATALEN-1] = '\0';
keyword = ScanKeywordLookup((char*)yytext);
if (keyword != NULL) {
@@ -402,8 +402,8 @@ other .
if (isascii((unsigned char)yytext[i]) &&
isupper(yytext[i]))
yytext[i] = tolower(yytext[i]);
if (i > NAMEDATALEN)
yytext[NAMEDATALEN] = '\0';
if (i >= NAMEDATALEN)
yytext[NAMEDATALEN-1] = '\0';
keyword = ScanKeywordLookup((char*)yytext);
if (keyword != NULL) {