| From: | "Daniel Verite" <daniel(at)manitou-mail(dot)org> |
|---|---|
| To: | "Laurenz Albe" <laurenz(dot)albe(at)cybertec(dot)at> |
| Cc: | Ron Johnson <ronljohnsonjr(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Choosing default collation/ctype |
| Date: | 2026-05-04 19:34:00 |
| Message-ID: | 627add7e-94df-49ca-aa12-ae3900b7945f@manitou-mail.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Laurenz Albe wrote:
> > Then choose UTF8.
>
> Right! And I recommend "C" for the collation.
Yet the "C" collation is unsuitable for handling character types
beyond ASCII.
For instance, it considers that accented letters are not letters,
so upper('été') is 'éTé' instead of 'ÉTÉ', and 'é' ~ '\w' is false.
C.UTF-8 solves that, and since Postgres 17, it's available for all operating
systems with the builtin provider.
So if you target Postgres 17+, C.UTF-8 from the builtin provider is
a better choice for UTF-8 databases than "C" .
Best regards,
--
Daniel Vérité
https://postgresql.verite.pro/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Matt Magoffin | 2026-05-04 19:53:39 | Re: Confirmation on concurrent SELECT FOR UPDATE with ON CONFLICT DO NOTHING |
| Previous Message | Amit Kapila | 2026-05-04 12:23:04 | Re: Support logical replication of DDLs, take2 |