Re: [patch] pg_test_timing does not prompt illegal option - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: [patch] pg_test_timing does not prompt illegal option
Date
Msg-id CAHGQGwGUXOqrzQdWr9kWMqBDH_3A9tKX6psv99SbLjFP2yWRrQ@mail.gmail.com
Whole thread Raw
In response to [patch] pg_test_timing does not prompt illegal option  ("Zhang, Jie" <zhangjie2@cn.fujitsu.com>)
Responses Re: [patch] pg_test_timing does not prompt illegal option
List pgsql-hackers
On Wed, Apr 17, 2019 at 6:21 PM Zhang, Jie <zhangjie2@cn.fujitsu.com> wrote:
>
> Hi all,
>
> pg_test_timing accepts the following command-line options:
> -d duration
> --duration=duration
>
>     Specifies the test duration, in seconds. Longer durations give slightly better accuracy, and are more likely to
discoverproblems with the system clock moving backwards. The default test duration is 3 seconds.
 
> -V
> --version
>
>     Print the pg_test_timing version and exit.
> -?
> --help
>
>     Show help about pg_test_timing command line arguments, and exit.
>
> [https://www.postgresql.org/docs/11/pgtesttiming.html]
>
> However, when I use the following command,  no error prompt. the command can run.
> pg_test_timing --
>
> I think "--" is a illegal option, errors should be prompted.
>
> Here is a patch for prompt illegal option.

This is not the problem only for pg_test_timing. If you want to
address this, the patch needs to cover all the client commands
like psql, createuser. I'm not sure if it's worth doing that.

Regards,

-- 
Fujii Masao



pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: ToDo: show size of partitioned table
Next
From: Tom Lane
Date:
Subject: Re: [patch] pg_test_timing does not prompt illegal option