Re: fix in --help output

Поиск
Список
Период
Сортировка
От Zdenek Kotala
Тема Re: fix in --help output
Дата
Msg-id 47BDEA1F.8060605@sun.com
обсуждение исходный текст
Ответ на Re: fix in --help output  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: fix in --help output  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: fix in --help output  (Andrew Dunstan <andrew@dunslane.net>)
Re: fix in --help output  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-patches
Tom Lane napsal(a):
> Zdenek Kotala <Zdenek.Kotala@Sun.COM> writes:
>> I attach fix for --help output. I replaced --NAME... with -NAME and add some
>> example. getopt parse -- as a end of options and rest of line is not parsed.
>
> Surely this is outright wrong.  Or if you do have a getopt that acts
> that way, the bug is that we are using it rather than one that acts
> the way we want.

Ah, sorry it really does not work.

However, I get following error on Solaris:

bash-3.2$ /usr/postgres/8.2/bin/postgres -D /tmp/db --share_buffers=16000
/usr/postgres/8.2/bin/postgres: illegal option -- share_buffers=16000
Try "postgres --help" for more information.

but following command works fine:

/usr/postgres/8.2/bin/postgres -D /tmp/db -c shared_buffers=16000


By my opinion problem is in getopt which interprets -- as a end of
options list.

See
http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html#tag_12_02
Guideline 10

It maybe work on linux but I think it is not portable solution.


        Zdenek

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: fix in --help output
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: fix in --help output