]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fix config file lexer to not barf if postgresql.conf ends with a comment
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 8 Jul 2005 18:41:55 +0000 (18:41 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 8 Jul 2005 18:41:55 +0000 (18:41 +0000)
that has no terminating newline.  Per report from maps.on at gmx.net.

src/backend/utils/misc/guc-file.l

index 60a42232a67d8b914807afc98ae698861427ce23..8ace835b8b86eb79e54616279e3e7081b07c51fb 100644 (file)
@@ -4,7 +4,7 @@
  *
  * Copyright (c) 2000-2005, PostgreSQL Global Development Group
  *
- * $PostgreSQL: pgsql/src/backend/utils/misc/guc-file.l,v 1.29 2005/01/01 05:43:08 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/misc/guc-file.l,v 1.29.4.1 2005/07/08 18:41:55 tgl Exp $
  */
 
 %{
@@ -69,7 +69,7 @@ STRING          \'([^'\n]|\\.)*\'
 
 \n              ConfigFileLineno++; return GUC_EOL;
 [ \t\r]+        /* eat whitespace */
-#.*$            /* eat comment */
+#.*             /* eat comment (.* matches anything until newline) */
 
 {ID}            return GUC_ID;
 {QUALIFIED_ID}  return GUC_QUALIFIED_ID;