bug in (plpgsql) parser?

From: "Reinoud van Leeuwen" <reinoud(at)xs4all(dot)nl>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: bug in (plpgsql) parser?
Date: 2001-05-31 16:01:38
Message-ID: 3953.194.109.0.126.991324898.squirrel@webmail2.xs4all.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello world,

I am using "PostgreSQL 7.1.2 on i386-unknown-freebsd4.2, compiled by GCC
2.95.2" (according to version()). I suspect that there is a parser bug in
the handling of '--' comments:

radius=# create function test() returns integer as '
radius'# begin
radius'# -- comment without quotes
radius'# return 0;
radius'# end;
radius'# ' language 'plpgsql';
CREATE

This works OK

radius=#
radius=# create function test2() returns integer as '
radius'# begin
radius'# -- comment 'with' quotes
radius'# return 0;
radius'# end;
radius'# ' language 'plpgsql';
ERROR: parser: parse error at or near "with"

It seems that the parser does not ignore the rest of the line after the '--
', as I would suspect...

Reinoud van Leeuwen
(switched from Sybase to Postgresql two weeks ago and has no regrets! :-)

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Letitia Hickman 2001-05-31 21:48:29 Help!
Previous Message pgsql-bugs 2001-05-31 14:45:28 GRANT SELECT ON ... TO username does REVOKE ALL ON ... FROM PUBLIC at the same time