Re: [patch] pg_test_timing does not prompt illegal option

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: [patch] pg_test_timing does not prompt illegal option
Дата
Msg-id alpine.DEB.2.21.1904172205280.26370@lancre
обсуждение исходный текст
Ответ на Re: [patch] pg_test_timing does not prompt illegal option  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hello Tom,

> We've generally felt that deferring to the behavior of the platform's
> getopt() or getopt_long() is a better idea than trying to enforce some
> lowest-common-denominator version of switch parsing, on the theory that
> users of a given platform will be used to whatever its getopt does.
> This does mean that we have undocumented behaviors on particular
> platforms.

Interesting.

> I'd say that accepting "--" is one of them.  Another example is that 
> glibc's getopt is willing to reorder the arguments, so that for example 
> this works for me:
>
> $ psql template1 -E
> psql (12devel)

Yep, I noticed that one by accident once.

> On other platforms that would not work, so we don't document it.

People might get surprised anyway, because the very same command may or 
may not work depending on the platform. Does not matter much, though.

-- 
Fabien.



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

Предыдущее
От: Dmitry Dolgov
Дата:
Сообщение: Re: Status of the table access method work
Следующее
От: Alexander Korotkov
Дата:
Сообщение: Re: jsonpath