public inbox for pgsql-general@postgresql.org
help / color / mirror / Atom feedFrom: Laurenz Albe <laurenz.albe@cybertec.at>
To: Daniel Verite <daniel@manitou-mail.org>
Cc: Ron Johnson <ronljohnsonjr@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Choosing default collation/ctype
Date: Mon, 04 May 2026 22:45:16 +0200
Message-ID: <bdce746ad6052774fbc0de138e7c4fcc77886e77.camel@cybertec.at> (raw)
In-Reply-To: <627add7e-94df-49ca-aa12-ae3900b7945f@manitou-mail.org>
References: <627add7e-94df-49ca-aa12-ae3900b7945f@manitou-mail.org>
On Mon, 2026-05-04 at 21:34 +0200, Daniel Verite wrote:
> 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" .
Yes, "builtin" and the "C" collation is the best default value.
Yours,
Laurenz Albe
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-general@postgresql.org
Cc: laurenz.albe@cybertec.at, daniel@manitou-mail.org, ronljohnsonjr@gmail.com, pgsql-general@lists.postgresql.org
Subject: Re: Choosing default collation/ctype
In-Reply-To: <bdce746ad6052774fbc0de138e7c4fcc77886e77.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox