improve pgbench syntax error messages

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема improve pgbench syntax error messages
Дата
Msg-id alpine.DEB.2.10.1503030926440.5591@sto
обсуждение исходный текст
Ответы Re: improve pgbench syntax error messages
Список pgsql-hackers
Report the origin of syntax errors from pgbench.

Currently only the column number (for expressions) and command are 
essentially reported:
  sh> ./pgbench -f bad.sql  syntax error at column 14  set: parse error

The patch helps locate the origin of errors with the file name, line 
number and the actual text triggering the issue (either the line or an 
extract for expressions):
  sh> ./pgbench -f bad.sql  syntax error at column 14  error while processing "bad.sql" line 3: (1021 * :id) %  set:
parseerror
 

Whether using a macro is the right tool is debatable. The contents could 
be expanded, but that would mean replicating the same message over and 
over again, so it seems cleaner to me this way. An function seems 
overkill.

-- 
Fabien.

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