Disallow zero-length delimited identifier (per SQL).
authorPeter Eisentraut
Mon, 30 Oct 2000 17:54:16 +0000 (17:54 +0000)
committerPeter Eisentraut
Mon, 30 Oct 2000 17:54:16 +0000 (17:54 +0000)
src/backend/parser/scan.l

index 13e6b92eda21ca492a5f3e249582bb4b87da4e6a..8a782f72aa66278fc6ccaa15ff5584a1b7ec08c7 100644 (file)
@@ -9,10 +9,12 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.78 2000/10/29 16:11:33 petere Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.79 2000/10/30 17:54:16 petere Exp $
  *
  *-------------------------------------------------------------------------
  */
+#include "postgres.h"
+
 #include 
 #include 
 #ifndef __linux__
@@ -20,8 +22,6 @@
 #endif
 #include 
 
-#include "postgres.h"
-
 #include "miscadmin.h"
 #include "nodes/parsenodes.h"
 #include "nodes/pg_list.h"
@@ -347,6 +347,8 @@ other           .
                }
 {xdstop}   {
                    BEGIN(INITIAL);
+                   if (strlen(literalbuf) == 0)
+                       elog(ERROR, "zero-length delimited identifier");
                    if (strlen(literalbuf) >= NAMEDATALEN)
                    {
 #ifdef MULTIBYTE