Re: [patch] pg_test_timing does not prompt illegal option

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: "Zhang, Jie" <zhangjie2(at)cn(dot)fujitsu(dot)com>
Cc: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [patch] pg_test_timing does not prompt illegal option
Date: 2019-04-17 14:14:19
Message-ID: CAHGQGwGUXOqrzQdWr9kWMqBDH_3A9tKX6psv99SbLjFP2yWRrQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Apr 17, 2019 at 6:21 PM Zhang, Jie <zhangjie2(at)cn(dot)fujitsu(dot)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 discover problems 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-04-17 14:24:17 Re: [patch] pg_test_timing does not prompt illegal option
Previous Message Justin Pryzby 2019-04-17 14:01:15 Re: ToDo: show size of partitioned table