1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-07 12:02:30 +03:00

Improve lexer's error reporting. You get the whole token mentioned now

in parse error messages, not just the part scanned by the last flex rule.
For example,
	select "foo" "bar";
used to draw
	ERROR:  parser: parse error at or near """
which was rather unhelpful.  Now it gives
	ERROR:  parser: parse error at or near ""bar""
Also, error messages concerning bitstring literals and suchlike will
quote the source text at you, not the processed internal form of the literal.
This commit is contained in:
Tom Lane
2002-05-01 17:12:08 +00:00
parent 241978b91b
commit 61446e0927
3 changed files with 73 additions and 48 deletions

View File

@@ -17,7 +17,7 @@ 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 "'"
ERROR: parser: parse error at or near "' - third line'"
--
-- test conversions between various string types
--