Improve lexer's error reporting. You get the whole token mentioned now
Tom Lane <tgl@sss.pgh.pa.us>
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.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/parser/scan.l | modified | +71 −46 |
| src/backend/po/nls.mk | modified | +1 −1 |
| src/test/regress/expected/strings.out | modified | +1 −1 |