Re: Setting "ucs_basic" as the default database collation - Mailing list pgsql-general

From Tom Lane
Subject Re: Setting "ucs_basic" as the default database collation
Date
Msg-id 3780280.1730044648@sss.pgh.pa.us
Whole thread Raw
In response to Setting "ucs_basic" as the default database collation  (Christophe Pettus <xof@thebuild.com>)
List pgsql-general
Christophe Pettus <xof@thebuild.com> writes:
> Is there a way to specify "ucs_basic" (or the other "standard collations" [1]) collation as the default database
collationat 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



pgsql-general by date:

Previous
From: Christophe Pettus
Date:
Subject: Re: Setting "ucs_basic" as the default database collation
Next
From: "Reftel, Bengt Erik Magnus"
Date:
Subject: Re: Max size per relation for partitioned tables