Re: improve pgbench syntax error messages

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: improve pgbench syntax error messages
Дата
Msg-id alpine.DEB.2.10.1503042213120.21747@sto
обсуждение исходный текст
Ответ на Re: improve pgbench syntax error messages  (Fabien COELHO <coelho@cri.ensmp.fr>)
Ответы Re: improve pgbench syntax error messages  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список 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.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: xpath changes in the recent back branches
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: MD5 authentication needs help