Commit 0672a3c0 authored by Tom Lane's avatar Tom Lane

Lexer defended us against overlength plain identifiers, but not against

overlength quoted identifiers.  Death and destruction ensue...
parent 36289fbb
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.70 2000/05/29 05:44:54 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.71 2000/06/01 22:21:05 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -326,6 +326,12 @@ other . ...@@ -326,6 +326,12 @@ other .
} }
<xd>{xdstop} { <xd>{xdstop} {
BEGIN(INITIAL); BEGIN(INITIAL);
if (strlen(literalbuf) >= NAMEDATALEN)
{
elog(NOTICE, "identifier \"%s\" will be truncated to \"%.*s\"",
literalbuf, NAMEDATALEN-1, literalbuf);
literalbuf[NAMEDATALEN-1] = '\0';
}
yylval.str = pstrdup(literalbuf); yylval.str = pstrdup(literalbuf);
return IDENT; return IDENT;
} }
......
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