public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Adrian Klaver <[email protected]>
Cc: Troels Arvin <[email protected]>
Cc: [email protected]
Subject: Re: utf8 vs UTF-8
Date: Sat, 18 May 2024 11:23:04 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
Adrian Klaver <[email protected]> writes:
> On 5/18/24 07:48, Troels Arvin wrote:
>> Also, when I try to create a database with "en_US.utf8" as locale
>> without specifying a template:
>>
>> troels=# create database test4 locale 'en_US.utf8';
>> ERROR: new collation (en_US.utf8) is incompatible with the collation of
>> the template database (en_US.UTF-8)
>> HINT: Use the same collation as in the template database, or use
>> template0 as template.
> I'm going to say that is Postgres being exact to a fault.
Yeah. glibc will treat those two locale names as equivalent,
and I think most if not all other libc implementations do too.
But Postgres doesn't know that so it demands exact textual
equality before assuming two locale names are equivalent.
If this is getting in your way you could probably get away with
just UPDATE-ing pg_database to use whichever spelling you think is
preferable; the strings appearing in datcollate and datctype aren't
stored anywhere else. (But experiment in a scratch installation to
verify that ... and don't try changing them to something that you
don't know to be semantically equivalent.)
regards, tom lane
view thread (4+ messages)
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: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: utf8 vs UTF-8
In-Reply-To: <[email protected]>
* 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