public inbox for pgsql-general@postgresql.org
help / color / mirror / Atom feedFrom: Daniel Verite <daniel@manitou-mail.org>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: Ron Johnson <ronljohnsonjr@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Choosing default collation/ctype
Date: Tue, 05 May 2026 13:16:14 +0200
Message-ID: <f7b3c538-8e78-47f4-82f1-2e54e8da2f0b@manitou-mail.org> (raw)
In-Reply-To: <bdce746ad6052774fbc0de138e7c4fcc77886e77.camel@cybertec.at>
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:
postgres=# create database dbc
template='template0'
locale_provider='builtin'
builtin_locale='C' ;
CREATE DATABASE
postgres=# \c dbc
You are now connected to database "dbc" as user "postgres".
dbc=# select upper('été');
upper
-------
éTé
(1 row)
It is not the correct uppercasing. On the other hand the "C.UTF-8"
locale, as opposed to "C", produces the correct result.
postgres=# create database dbcutf8
template='template0'
locale_provider='builtin'
builtin_locale='C.UTF-8' ;
CREATE DATABASE
postgres=# \c dbcutf8
You are now connected to database "dbcutf8" as user "postgres".
dbcutf8=# select upper('été');
upper
-------
ÉTÉ
(1 row)
Best regards,
--
Daniel Vérité
https://postgresql.verite.pro/
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: daniel@manitou-mail.org, laurenz.albe@cybertec.at, ronljohnsonjr@gmail.com, pgsql-general@lists.postgresql.org
Subject: Re: Choosing default collation/ctype
In-Reply-To: <f7b3c538-8e78-47f4-82f1-2e54e8da2f0b@manitou-mail.org>
* 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