Re: unrecognized option '--help - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: unrecognized option '--help
Date
Msg-id CAB7nPqT=EThRyqmb3vixi1qa1WevMitPk2GHqY2MvOwr0aOk_w@mail.gmail.com
Whole thread Raw
In response to unrecognized option '--help  ("D. S." <spider@skuggor.se>)
Responses Re: unrecognized option '--help  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-bugs
On Thu, May 21, 2015 at 4:35 PM, D. S. <spider@skuggor.se> wrote:
> Explanation:
> If anything is ahead of --help, "--help" is then an unrecognized
> option.

It is wanted this way for all the utilities of src/bin. See
handle_help_version_opts() in src/bin/scripts/common.c for your case.

> But the error message is still nonsensical, absurd and in the end, not
> very helpful.

Why? We could change handle_help_version_opts() to track the instances
of --help/-? or --version/-V in the whole set of argc but:
1) This would change a behavior that has been like that for a long time
2) To which one should we give priority if both are specified
3) I am expecting someone else to show up and say that this is spec-compliant
Still arguably that's a feature, not a bug.
--
Michael

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #13327: Error on insert (gist index)
Next
From: Stephen Frost
Date:
Subject: Re: pg_get_constraintdef() doesn't always give an equal constraint