Re: unrecognized option '--help

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: unrecognized option '--help
Дата
Msg-id 20150522035921.GT5885@postgresql.org
обсуждение исходный текст
Ответ на Re: unrecognized option '--help  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: unrecognized option '--help  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-bugs
Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:

> > I don't think it really is the symptom complained about here. Right now
> > "vacuumdb dbname --verbose" works (i.e. recognizes verbose as an
> > option), whereas "vacuumdb dbname --help" doesn't. The latter is what's
> > complained about here. And the reason for that is that
> > --help/-?/--version/-v aren't part of the getopt_long() call.
>
> Meh.  I don't particularly object to including --help in the switch set
> recognized in getopt_long ... but I doubt that that will actually fix
> Alvaro's scenario.

Nah, I think that's okay for my usage.

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

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: unrecognized option '--help
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: unrecognized option '--help