1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-11 05:41:32 +03:00

Truncate identifiers at NAMEDATALEN length.

This commit is contained in:
Bruce Momjian 1998-08-29 02:36:18 +00:00
parent 3e87302201
commit d15c37ca82

View File

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