Re: pgsql: Use ICU by default at initdb time.

Jeff Davis <pgsql@j-davis.com>

From: Jeff Davis <pgsql@j-davis.com>
To: Jeff Davis <jdavis@postgresql.org>, pgsql-committers@lists.postgresql.org
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Date: 2023-03-10T02:26:34Z
Lists: pgsql-hackers

Attachments

On Thu, 2023-03-09 at 19:11 +0000, Jeff Davis wrote:
> Use ICU by default at initdb time.

I'm seeing a failure on hoverfly:

https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=hoverfly&dt=2023-03-09%2021%3A51%3A45&stg=initdb-en_US.8859-15

That's because ICU always uses UTF-8 by default. ICU works just fine
with many other encodings; is there a reason it doesn't take it from
the environment just like for provider=libc?

Of course, we still need to default to UTF-8 when the encoding from the
environment isn't supported by ICU.

Patch attached. Requires a few test fixups to adapt.

-- 
Jeff Davis
PostgreSQL Contributor Team - AWS


Commits

  1. initdb: derive encoding from locale for ICU; similar to libc.

  2. Use ICU by default at initdb time.