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

Поиск
Список
Период
Сортировка
От Greg Sabino Mullane
Тема Re: Better error message when --single is not the first arg to postgres executable
Дата
Msg-id CAKAnmmKW6oK7JuiuD1mHEq3MiVWRhVmp+MRz8Oc_smFCg3CpCA@mail.gmail.com
обсуждение исходный текст
Ответ на 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
If I am reading your patch correctly, we have lost the behavior of least surprise in which the first "meta" argument overrides all others:

$ bin/postgres --version --boot --extrastuff
postgres (PostgreSQL) 16.2

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.

However, there's a complication:
...
This remaining discrepancy might be okay, but I was really hoping to reduce
the burden on users to figure out the correct ordering of options.  The
situations in which I've had to use single-user mode are precisely the
situations in which I'd rather not have to spend time learning these kinds
of details.

Yes, that's unfortunate. But I'd be okay with the db-last requirement as long as the error message is sane and points one in the right direction.

Cheers,
Greg

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

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: Missing docs for new enable_group_by_reordering GUC
Следующее
От: Tender Wang
Дата:
Сообщение: Re: Should consider materializing the cheapest inner path in consider_parallel_nestloop()