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

Поиск
Список
Период
Сортировка
От Greg Sabino Mullane
Тема Better error message when --single is not the first arg to postgres executable
Дата
Msg-id CAKAnmmJkZtZAiSryho=gYpbvC7H-HNjEDAh16F3SoC9LPu8rqQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Better error message when --single is not the first arg to postgres executable
Список pgsql-hackers
Please find attached a quick patch to prevent this particularly bad error message for running "postgres", when making the common mistake of forgetting to put the "--single" option first because you added an earlier arg (esp. datadir)

Current behavior:

$ ~/pg/bin/postgres -D ~/pg/data --single
2024-06-05 18:30:40.296 GMT [22934] FATAL:  --single requires a value

Improved behavior:

$ ~/pg/bin/postgres -D ~/pg/data --single
--single must be first argument.

I applied it for all the "first arg only" flags (boot, check, describe-config, and fork), as they suffer the same fate.

Cheers,
Greg

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: question regarding policy for patches to out-of-support branches
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: ssl tests fail due to TCP port conflict