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: Tue, 05 May 2026 13:31:00 +0200
Message-ID: <7a6954c2dfe3f224b4c45aa59f7fb6e951ce93b0.camel@cybertec.at> (raw)
In-Reply-To: <f7b3c538-8e78-47f4-82f1-2e54e8da2f0b@manitou-mail.org>
References: <f7b3c538-8e78-47f4-82f1-2e54e8da2f0b@manitou-mail.org>
On Tue, 2026-05-05 at 13:16 +0200, Daniel Verite wrote:
> Laurenz Albe wrote:
>
> > > 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.
>
> But my point was that, no, it's not.
> Let's show a concrete example with Postgres 18:
>
> [...]
>
> It is not the correct uppercasing.
That is true.
But if you are using "C.UTF-8", the semantics of upper() can change
between versions, if Unicode is upgraded. That bears a residual risk
of OS upgrades breaking indexes on upper(col).
I'd say that the small benefit of better case conversion isn't worth
the risk. I'd chose "C", and use a natural language collation explicitly
on columns where these things matter.
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: <7a6954c2dfe3f224b4c45aa59f7fb6e951ce93b0.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