Peter has fixed this in CVS. Thanks for the report.
---
Richard Huxton wrote:
> Versions: 7.3, 7.4beta (not latest)
> Applies to SQL functions, but not apparently to plpgsql (because of the
> different parser, I presume).
Tom Lane writes:
> I think the minimum-damage place to fix this is by requiring \n after
> {comment} in the horiz_whitespace rule. As is, it's possible for
> xqcat to match to a second quote that is in the body of a -- comment.
You mean like this?
horiz_whitespace({horiz_space}|{comment
Peter Eisentraut <[EMAIL PROTECTED]> writes:
> The bug here is that the scanner doesn't know that a newline (or end of
> input) is a required as part of a -- comment.
I think the minimum-damage place to fix this is by requiring \n after
{comment} in the horiz_whitespace rule. As is, it's possible
On Wednesday 08 October 2003 20:56, Peter Eisentraut wrote:
> Richard Huxton writes:
> > CREATE OR REPLACE FUNCTION zzz_test () RETURNS text AS '
> > SELECT ''hello world''
> > -- SELECT ''goodbye world''
> >
> > ::text;
> >
> > ' LANGUAGE 'SQL';
> >
> > ERROR: parser: unterminated quoted string
Richard Huxton writes:
> CREATE OR REPLACE FUNCTION zzz_test () RETURNS text AS '
> SELECT ''hello world''
> -- SELECT ''goodbye world''
> ::text;
> ' LANGUAGE 'SQL';
>
> ERROR: parser: unterminated quoted string at or near "'hello world'
> -- SELECT 'goodbye world'
> ::text;
That's a good one
Versions: 7.3, 7.4beta (not latest)
Applies to SQL functions, but not apparently to plpgsql (because of the
different parser, I presume).
This is really a "doctor it hurts when I..." thing - the fact that I've never
come across it before must mean it's pretty hard to trigger.
The first version