Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0672a3c

Browse files
committed
Lexer defended us against overlength plain identifiers, but not against
overlength quoted identifiers. Death and destruction ensue...
1 parent36289fb commit0672a3c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎src/backend/parser/scan.l

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.70 2000/05/29 05:44:54 tgl Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.71 2000/06/01 22:21:05 tgl Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -326,6 +326,12 @@ other.
326326
}
327327
<xd>{xdstop}{
328328
BEGIN(INITIAL);
329+
if (strlen(literalbuf) >= NAMEDATALEN)
330+
{
331+
elog(NOTICE,"identifier\"%s\" will be truncated to\"%.*s\"",
332+
literalbuf, NAMEDATALEN-1, literalbuf);
333+
literalbuf[NAMEDATALEN-1] ='\0';
334+
}
329335
yylval.str =pstrdup(literalbuf);
330336
return IDENT;
331337
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp