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

Commitd397c1c

Browse files
committed
Disallow zero-length delimited identifier (per SQL).
1 parentc7a3e0d commitd397c1c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

‎src/backend/parser/scan.l

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.78 2000/10/29 16:11:33 petere Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.79 2000/10/30 17:54:16 petere Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
16+
#include"postgres.h"
17+
1618
#include<ctype.h>
1719
#include<unistd.h>
1820
#ifndef __linux__
1921
#include<math.h>
2022
#endif
2123
#include<errno.h>
2224

23-
#include"postgres.h"
24-
2525
#include"miscadmin.h"
2626
#include"nodes/parsenodes.h"
2727
#include"nodes/pg_list.h"
@@ -347,6 +347,8 @@ other.
347347
}
348348
<xd>{xdstop}{
349349
BEGIN(INITIAL);
350+
if (strlen(literalbuf) ==0)
351+
elog(ERROR,"zero-length delimited identifier");
350352
if (strlen(literalbuf) >= NAMEDATALEN)
351353
{
352354
#ifdef MULTIBYTE

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp