Re: Confusing error message in pgbench

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Confusing error message in pgbench
Date: 2017-08-02 12:22:02
Message-ID: CA+TgmobrpYNSNfoVtc=ELyLO6pD-LwZq20oCW9URLdrmqrNATw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 1, 2017 at 10:03 PM, Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp> 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
> confused. Actually the error occurs because pgbench implicitly
> introduces a built in script for -S. To eliminate the confusion, I
> think the error message should be fixed like this:
>
> query mode (-M) should be specified before transaction type (-S or -N) or any transaction scripts (-f or -b)
>
> Patch attached.

Not really objecting, but an even better fix might be to remove the
restriction on the order in which the options can be specified.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-08-02 13:25:45 Re: pgbench: Skipping the creating primary keys after initialization
Previous Message Robert Haas 2017-08-02 12:21:03 Re: typo for using "OBJECT_TYPE" for "security label on domain" in "gram.y"