Better handling of parse errors - Mailing list pgsql-hackers

From Gavin Sherry
Subject Better handling of parse errors
Date
Msg-id Pine.LNX.4.21.0208062211200.16671-101000@linuxworld.com.au
Whole thread Raw
Responses Re: Better handling of parse errors  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: Better handling of parse errors  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi all,

Attached is a small patch to scan.l for consideration. It hands
yyerror() the position in the query string of the token which caused a
parse error. It is not even close to an implementation of error handling
a-la SQL99 but it certainly makes debugging complicated queries easier.

I've done some testing and it appears to hit the offending token pretty
accurately.

Can anyone find a way to break this? If not, I'd love to see it in 7.3.

Gavin

pgsql-hackers by date:

Previous
From: Oleg Bartunov
Date:
Subject: CVS sources doesn't compiles
Next
From: Bruce Momjian
Date:
Subject: Re: DB-local usernames