new environment variable INITDB_LOCALE_PROVIDER - Mailing list pgsql-hackers

From Jeff Davis
Subject new environment variable INITDB_LOCALE_PROVIDER
Date
Msg-id 7d424dc0b032b30a22220634d12377bf59524bdb.camel@j-davis.com
Whole thread Raw
List pgsql-hackers
$SUBJECT makes it easier to test other providers, especially the
regression tests.

For this to be useful, it should avoid throwing an error for plain
"initdb" (without locale flags specified), which means we need defaults
for the builtin locale or the ICU locale. I chose "C.UTF-8" and "und"
(we could also have environment variables for those too, but that would
create some questions when --locale is also specified).

Another benefit is that this would make it easier to change the initdb
default, which is being discussed here:

https://www.postgresql.org/message-id/9b259f4c532943e428e9665122f37c099bab250e.camel@j-davis.com

One annoyance is that the tests don't pass when
INITDB_LOCALE_PROVIDER=icu. That's because a lot of tests use either --
locale=C or --no-locale, and ICU doesn't have a way to interpret that.
We could force the provider to be builtin in that case, I suppose.

Another annoyance is that, if INITDB_LOCALE_PROVIDER=builtin, and
LC_CTYPE is not UTF-8-compatible, then we need to force LC_CTYPE=C.
That affects fewer things than it would with the libc provider, but it
still affects some things.

Regards,
    Jeff Davis


Attachment

pgsql-hackers by date:

Previous
From: Iván Chavero
Date:
Subject: Re: libxml2 author overwhelmed with security requests
Next
From: Jeff Davis
Date:
Subject: Re: pg_dump --with-* options