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

From Fabien COELHO
Subject Re: [patch] pg_test_timing does not prompt illegal option
Date
Msg-id alpine.DEB.2.21.1904171811340.26370@lancre
Whole thread Raw
In response to Re: [patch] pg_test_timing does not prompt illegal option  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [patch] pg_test_timing does not prompt illegal option
List pgsql-hackers
>> 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).

"src/port/getopt_long.c" checks for "--" as the end of options.

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [patch] pg_test_timing does not prompt illegal option
Next
From: Andres Freund
Date:
Subject: Re: Unhappy about API changes in the no-fsm-for-small-rels patch