Skip to content

Commit d397c1c

Browse files
committed
Disallow zero-length delimited identifier (per SQL).
1 parent c7a3e0d commit d397c1c

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy