public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Christophe Pettus <[email protected]>
Cc: pgsql-general <[email protected]>
Subject: Re: Setting "ucs_basic" as the default database collation
Date: Sun, 27 Oct 2024 11:57:28 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
Christophe Pettus <[email protected]> writes:
> Is there a way to specify "ucs_basic" (or the other "standard collations" [1]) collation as the default database collation at database creation time, rather than on a per-column or per-operation basis?
CREATE DATABASE wants you to specify a locale, which ucs_basic is not.
It's defined by SQL as a standard collation name, but that doesn't
make it a complete locale specification. You can do something like
regression=# create database db1 with encoding = 'utf8' locale = 'en_US.utf8' template = template0;
CREATE DATABASE
or
regression=# create database db2 with encoding = 'utf8' icu_locale = 'en-US-x-icu' locale_provider = icu template = template0;
CREATE DATABASE
or
regression=# create database db3 with encoding = 'utf8' locale = 'POSIX' template = template0;
CREATE DATABASE
regards, tom lane
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]
Subject: Re: Setting "ucs_basic" as the default database collation
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