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

From Tom Lane
Subject Re: [patch] pg_test_timing does not prompt illegal option
Date
Msg-id 29470.1555511057@sss.pgh.pa.us
Whole thread Raw
In response to Re: [patch] pg_test_timing does not prompt illegal option  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: [patch] pg_test_timing does not prompt illegal option
Re: [patch] pg_test_timing does not prompt illegal option
List pgsql-hackers
Fujii Masao <masao.fujii@gmail.com> writes:
> On Wed, Apr 17, 2019 at 6:21 PM Zhang, Jie <zhangjie2@cn.fujitsu.com> wrote:
>> I think "--" is a illegal option, errors should be prompted.

> 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.

I think it might be an actively bad idea.  There's a pretty
widespread convention that "--" is a no-op switch indicating
the end of switches.  At least some of our tools appear to
honor that behavior (probably because glibc's getopt_long
does; I do not think we are implementing it ourselves).

            regards, tom lane



pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: [patch] pg_test_timing does not prompt illegal option
Next
From: Tom Lane
Date:
Subject: Idea for fixing parallel pg_dump's lock acquisition problem