Skip to content

Commit 40d091b

Browse files
committed
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.
1 parent 0ed5f90 commit 40d091b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
66
*
7-
* $PostgreSQL: pgsql/src/backend/utils/misc/guc-file.l,v 1.30 2005/03/11 19:13:42 momjian Exp $
7+
* $PostgreSQL: pgsql/src/backend/utils/misc/guc-file.l,v 1.31 2005/07/08 18:41:40 tgl Exp $
88
*/
99

1010
%{
@@ -70,7 +70,7 @@ STRING \'([^'\n]|\\.)*\'
7070
7171
\n ConfigFileLineno++; return GUC_EOL;
7272
[ \t\r]+ /* eat whitespace */
73-
#.*$ /* eat comment */
73+
#.* /* eat comment (.* matches anything until newline) */
7474
7575
{ID} return GUC_ID;
7676
{QUALIFIED_ID} return GUC_QUALIFIED_ID;

0 commit comments

Comments
 (0)