> 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.
Indeed. Here is a v2.
sh> ./pgbench -f bad.sql bad.sql:3: syntax error at column 23 in command "set" \set aid (1021 * :id) %
^ error found here
sh> ./pgbench -f bad2.sql bad2.sql:1: unexpected argument (x) at column 25 in command "setrandom" \setrandom id
11000 x ^ error found here
sh> ./pgbench -f bad3.sql bad3.sql:1: too many arguments (gaussian) at column 35 in command "setrandom" \setrandom
foo1 10 gaussian 10.3 1 ^ error found here
sh> ./pgbench -f bad4.sql bad4.sql:1: missing threshold argument (exponential) in command "setrandom" \setrandom foo
110 exponential
I think that transforming unexpected garbage in errors would be a good
move, even if this breaks backwards compatibility (currently a warning is
printed about ignored extra stuff).
--
Fabien.