Re: ICU for global collation - Mailing list pgsql-hackers

From Daniel Verite
Subject Re: ICU for global collation
Date
Msg-id 33af6926-cc9f-486d-8db1-41c575b9a9cb@manitou-mail.org
Whole thread Raw
In response to Re: ICU for global collation  (Julien Rouhaud <rjuju123@gmail.com>)
List pgsql-hackers
    Julien Rouhaud wrote:

> If you want a database with an ICU default collation the lc_collate
> and lc_ctype should inherit what's in the template database and not
> what was provided in the LOCALE I think.  You could still probably
> overload them in some scenario, but without a list of what isn't
> ICU-aware I can't really be sure of how often one might have to do
> it.

I guess we'd need that when creating a database with a different
encoding than the template databases, at least.

About what's not ICU-aware, I believe the most significant part in
core is the Full Text Search parser.
It doesn't care about sorting strings, but it relies on the functions
from POSIX <ctype.h>, which depend on LC_CTYPE
(it looks however that this could be improved by following
what has been done in backend/regex/regc_pg_locale.c, which has
comparable needs and calls ICU functions when applicable).

Also, any extension is potentially concerned. Surely many
extensions call functions from ctype.h assuming that
the current value of LC_CTYPE works with the data they handle.


Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: https://www.manitou-mail.org
Twitter: @DanielVerite



pgsql-hackers by date:

Previous
From: Ali Koca
Date:
Subject: ...
Next
From: Simon Riggs
Date:
Subject: Re: Add 64-bit XIDs into PostgreSQL 15