1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-17 06:41:09 +03:00

Use ICU by default at initdb time.

If the ICU locale is not specified, initialize the default collator
and retrieve the locale name from that.

Discussion: https://postgr.es/m/510d284759f6e943ce15096167760b2edcb2e700.camel@j-davis.com
Reviewed-by: Peter Eisentraut
This commit is contained in:
Jeff Davis
2023-03-09 10:52:41 -08:00
parent a7e584a7d6
commit 27b62377b4
18 changed files with 147 additions and 42 deletions

View File

@ -1,3 +1,12 @@
-- unaccent is broken if the default collation is provided by ICU and
-- LC_CTYPE=C
SELECT current_setting('lc_ctype') = 'C' AND
(SELECT datlocprovider='i' FROM pg_database
WHERE datname=current_database())
AS skip_test \gset
\if :skip_test
\quit
\endif
CREATE EXTENSION unaccent;
-- must have a UTF8 database
SELECT getdatabaseencoding();

View File

@ -0,0 +1,8 @@
-- unaccent is broken if the default collation is provided by ICU and
-- LC_CTYPE=C
SELECT current_setting('lc_ctype') = 'C' AND
(SELECT datlocprovider='i' FROM pg_database
WHERE datname=current_database())
AS skip_test \gset
\if :skip_test
\quit

View File

@ -1,3 +1,14 @@
-- unaccent is broken if the default collation is provided by ICU and
-- LC_CTYPE=C
SELECT current_setting('lc_ctype') = 'C' AND
(SELECT datlocprovider='i' FROM pg_database
WHERE datname=current_database())
AS skip_test \gset
\if :skip_test
\quit
\endif
CREATE EXTENSION unaccent;
-- must have a UTF8 database