From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, "D(dot) S(dot)" <spider(at)skuggor(dot)se>, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: unrecognized option '--help |
Date: | 2015-05-22 06:22:57 |
Message-ID: | CAB7nPqQx4pSMt=0qshQd630+nR0nKNTrxG_H2Xj8dQL2wQ6UVg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Fri, May 22, 2015 at 12:59 PM, Alvaro Herrera wrote:
> Tom Lane wrote:
>> Note that we should not rip out the existing code, because part of the
>> reason for that is that it acts before any of the other stuff that runs
>> before getopt parsing starts, eg the postmaster's refusal to run if you're
>> root.
>
> No objection to that, though I wonder (without looking at the code) if
> for binaries other than postmaster this is really worthwhile.
I would plead for consistency in this area, aka moving the root check
before the option parsing for all the utilies, still check --help and
--version are argv[1] (or argv[optind]), and move them as well in
getopt_long parsing to get cleaner error messages be one of them
mentioned. I can believe that some people may want to have quick looks
at --help or --version even when running a binary utility as root even
if it is not permitted to run under such circumstances.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Fabien COELHO | 2015-05-22 09:33:19 | Re: BUG #12379: pgbench should hint to pgbench -i |
Previous Message | Michael Paquier | 2015-05-22 06:13:07 | Re: unrecognized option '--help |