Gavin Sherry writes:
> In that case, attached is a patch which locates the beginning of the
> offending token more efficiently (per your suggestion of using
> scanbuf).
In the regression tests there are a couple of cases that could be
improved:
In strings.sql:
-- illegal string continuation syntax
SELECT 'first line'
' - next line' /* this comment is not allowed here */
' - third line' AS "Illegal comment within continuation";
ERROR: parser: parse error at or near "' - third line'" at character 89
Character 89 is the end of the "third line" line, but the parse error is
at the beginning of that line.
In create_function_1.sql:
CREATE FUNCTION test1 (int) RETURNS int LANGUAGE sql AS 'not even SQL';
ERROR: parser: parse error at or near "not" at character 1
Clearly confusing.
--
Peter Eisentraut peter_e@gmx.net