| From: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
|---|---|
| To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
| Cc: | PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: improve pgbench syntax error messages |
| Date: | 2015-03-04 21:17:23 |
| Message-ID: | alpine.DEB.2.10.1503042213120.21747@sto |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> Indeed. Here is a v2.
Here is a v3, which (1) activates better error messages from bison
and (2) improves the error reporting from the scanner as well.
> sh> ./pgbench -f bad.sql
> bad.sql:3: syntax error at column 23 in command "set"
> \set aid (1021 * :id) %
> ^ error found here
the improved message is:
bad.sql:3: syntax error, unexpected $end at column 23 in command "set"
\set aid (1021 * :id) %
^ error found here
Also scanner errors are better:
sh> ./pgbench -f bad5.sql
bad5.sql:1: unexpected character (a) at column 12 in command "set"
\set foo 12abc
^ error found here
--
Fabien.
| Attachment | Content-Type | Size |
|---|---|---|
| pgbench-expr-error-3.patch | text/x-diff | 9.5 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Stephen Frost | 2015-03-04 21:19:00 | Re: MD5 authentication needs help |
| Previous Message | Peter Eisentraut | 2015-03-04 21:11:24 | Re: xpath changes in the recent back branches |