Re: [patch] pg_test_timing does not prompt illegal option

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, "Zhang, Jie" <zhangjie2(at)cn(dot)fujitsu(dot)com>, "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 16:13:47
Message-ID: alpine.DEB.2.21.1904171811340.26370@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-hackers by date

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