Commit 40d091b8 authored by Tom Lane's avatar Tom Lane

Fix config file lexer to not barf if postgresql.conf ends with a comment

that has no terminating newline.  Per report from maps.on at gmx.net.
parent 0ed5f90d
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* *
* Copyright (c) 2000-2005, PostgreSQL Global Development Group * Copyright (c) 2000-2005, PostgreSQL Global Development Group
* *
* $PostgreSQL: pgsql/src/backend/utils/misc/guc-file.l,v 1.30 2005/03/11 19:13:42 momjian Exp $ * $PostgreSQL: pgsql/src/backend/utils/misc/guc-file.l,v 1.31 2005/07/08 18:41:40 tgl Exp $
*/ */
%{ %{
...@@ -70,7 +70,7 @@ STRING \'([^'\n]|\\.)*\' ...@@ -70,7 +70,7 @@ STRING \'([^'\n]|\\.)*\'
\n ConfigFileLineno++; return GUC_EOL; \n ConfigFileLineno++; return GUC_EOL;
[ \t\r]+ /* eat whitespace */ [ \t\r]+ /* eat whitespace */
#.*$ /* eat comment */ #.* /* eat comment (.* matches anything until newline) */
{ID} return GUC_ID; {ID} return GUC_ID;
{QUALIFIED_ID} return GUC_QUALIFIED_ID; {QUALIFIED_ID} return GUC_QUALIFIED_ID;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment