Re: Better error message when --single is not the first arg to postgres executable

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Better error message when --single is not the first arg to postgres executable
Дата
Msg-id 4881958b-a56e-4f73-9203-ca0ab9e10581@eisentraut.org
обсуждение исходный текст
Ответ на Re: Better error message when --single is not the first arg to postgres executable  (Nathan Bossart <nathandbossart@gmail.com>)
Ответы Re: Better error message when --single is not the first arg to postgres executable
Список pgsql-hackers
On 19.06.24 16:04, Nathan Bossart wrote:
>> What about just inlining --version and --help e.g.
>>
>> else if (strcmp(argv[i], "--version") == 0 || strcmp(argv[i], "-V") == 0)
>> {
>>       fputs(PG_BACKEND_VERSIONSTR, stdout);
>>       exit(0);
>> }
>>
>> I'm fine with being more persnickety about the other options; they are much
>> rarer and not unixy.
> 
> That seems like it should work.  I'm not sure I agree that's the least
> surprising behavior (e.g., what exactly is the user trying to tell us with
> commands like "postgres --version --help --describe-config"?), but I also
> don't feel too strongly about it.

There is sort of an existing convention that --help and --version behave 
like this, meaning they act immediately and exit without considering 
other arguments.

I'm not really sure all this here is worth solving.  I think requiring 
things like --single or --boot to be first seems ok, and the 
alternatives just make things more complicated.



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

Предыдущее
От: jian he
Дата:
Сообщение: Re: SQL/JSON query functions context_item doc entry and type requirement
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: What is a typical precision of gettimeofday()?