Re: new environment variable INITDB_LOCALE_PROVIDER

Поиск
Список
Период
Сортировка
От Chao Li
Тема Re: new environment variable INITDB_LOCALE_PROVIDER
Дата
Msg-id 363CC188-1793-4040-BB84-1D73CC467F81@gmail.com
обсуждение исходный текст
Ответ на Re: new environment variable INITDB_LOCALE_PROVIDER  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: new environment variable INITDB_LOCALE_PROVIDER
Список pgsql-hackers


On Oct 9, 2025, at 12:27, Jeff Davis <pgsql@j-davis.com> wrote:

* If the provider is builtin and the LC_CTYPE or LC_COLLATE environment
variables aren't compatible with UTF-8, it can override those to "C".
But if --locale, --lc-ctype, or --lc-collate are specified and
incompatible, they will throw an error instead.

Overall the code looks good to me. I do have a question about the design here.

Are we assuming that 

* if the settings come from command line options, then the user is intentionally doing that, so we throw an error
* if the settings come from env, then the user might not be aware of them, so we only issue a warning?

If that’s the case, I’m not fully convinced by this design. Since initdb is a one-time operation, I think it would be better to require everything to be explicit.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/




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