Re: improve pgbench syntax error messages
От | Robert Haas |
---|---|
Тема | Re: improve pgbench syntax error messages |
Дата | |
Msg-id | CA+Tgmob3D2qTjFuWWK5f3ECoVW6hsqz4OwCnqXwmhdczTJNPLA@mail.gmail.com обсуждение исходный текст |
Ответ на | improve pgbench syntax error messages (Fabien COELHO <coelho@cri.ensmp.fr>) |
Ответы |
Re: improve pgbench syntax error messages
|
Список | pgsql-hackers |
On Tue, Mar 3, 2015 at 3:48 AM, Fabien COELHO <coelho@cri.ensmp.fr> wrote: > 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: parse error > > 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. As I mentioned on the other thread, I'd really like to get this into a better format, where each error message is on one line. Looking at that, you can't tell whether you've got one mistake, two mistakes, or three mistakes. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgsql-hackers по дате отправления: