From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Christophe Pettus <xof(at)thebuild(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Setting "ucs_basic" as the default database collation |
Date: | 2024-10-27 15:57:28 |
Message-ID: | 3780280.1730044648@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Christophe Pettus <xof(at)thebuild(dot)com> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Reftel, Bengt Erik Magnus | 2024-10-28 09:41:36 | Re: Max size per relation for partitioned tables |
Previous Message | Costa Alexoglou | 2024-10-27 15:23:44 | Used memory calculation in containers - docker stats and file cache |