Re: [HACKERS] Confusing error message in pgbench

2017-08-03 Thread Fabien COELHO
Indeed. It doesn't look that hard: AFAICS the problem is just that process_sql_command() is making premature decisions about whether to extract parameters from the SQL commands. Proposed patch attached. Great. Patch looks good to me. Too me as well: code looks ok, patch applies, compiles,

Re: [HACKERS] Confusing error message in pgbench

2017-08-02 Thread Tatsuo Ishii
>> Not really objecting, but an even better fix might be to remove the >> restriction on the order in which the options can be specified. > > Indeed. It doesn't look that hard: AFAICS the problem is just that > process_sql_command() is making premature decisions about whether to > extract paramet

Re: [HACKERS] Confusing error message in pgbench

2017-08-02 Thread Tatsuo Ishii
> Not really objecting, but an even better fix might be to remove the > restriction on the order in which the options can be specified. +100 :-) Best regards, -- Tatsuo Ishii SRA OSS, Inc. Japan English: http://www.sraoss.co.jp/index_en.php Japanese:http://www.sraoss.co.jp -- Sent via pgsql-ha

Re: [HACKERS] Confusing error message in pgbench

2017-08-02 Thread Tom Lane
Robert Haas writes: > On Tue, Aug 1, 2017 at 10:03 PM, Tatsuo Ishii wrote: >> I found an error message in pgbench is quite confusing. > Not really objecting, but an even better fix might be to remove the > restriction on the order in which the options can be specified. Indeed. It doesn't look

Re: [HACKERS] Confusing error message in pgbench

2017-08-02 Thread Fabien COELHO
Hello Tatsuo-san, I found an error message in pgbench is quite confusing. pgbench -S -M extended -c 1 -T 30 test query mode (-M) should be specified before any transaction scripts (-f or -b) Since there's no -f or -b option is specified, users will be confused. Indeed. Actually the error o

Re: [HACKERS] Confusing error message in pgbench

2017-08-02 Thread Robert Haas
On Tue, Aug 1, 2017 at 10:03 PM, Tatsuo Ishii wrote: > I found an error message in pgbench is quite confusing. > > pgbench -S -M extended -c 1 -T 30 test > query mode (-M) should be specified before any transaction scripts (-f or -b) > > Since there's no -f or -b option is specified, users will be