1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-28 18:48:04 +03:00

CREATE DATABASE: make LOCALE apply to all collation providers.

For CREATE DATABASE, make LOCALE parameter apply regardless of the
provider used. Also affects initdb and createdb --locale arguments.

Previously, LOCALE (and --locale) only affected the database default
collation when using the libc provider.

Discussion: https://postgr.es/m/1a63084d-221e-4075-619e-6b3e590f673e@enterprisedb.com
Reviewed-by: Peter Eisentraut
This commit is contained in:
Jeff Davis
2023-06-16 10:27:32 -07:00
parent c0d951262c
commit a14e75eb0b
12 changed files with 155 additions and 60 deletions

View File

@@ -85,9 +85,16 @@ CREATE COLLATION [ IF NOT EXISTS ] <replaceable>name</replaceable> FROM <replace
<listitem>
<para>
This is a shortcut for setting <symbol>LC_COLLATE</symbol>
and <symbol>LC_CTYPE</symbol> at once. If you specify this,
you cannot specify either of those parameters.
The locale name for this collation. See <xref
linkend="collation-managing-create-libc"/> and <xref
linkend="collation-managing-create-icu"/> for details.
</para>
<para>
If <replaceable>provider</replaceable> is <literal>libc</literal>, this
is a shortcut for setting <symbol>LC_COLLATE</symbol> and
<symbol>LC_CTYPE</symbol> at once. If you specify
<replaceable>locale</replaceable>, you cannot specify either of those
parameters.
</para>
</listitem>
</varlistentry>
@@ -97,8 +104,9 @@ CREATE COLLATION [ IF NOT EXISTS ] <replaceable>name</replaceable> FROM <replace
<listitem>
<para>
Use the specified operating system locale for
the <symbol>LC_COLLATE</symbol> locale category.
If <replaceable>provider</replaceable> is <literal>libc</literal>, use
the specified operating system locale for the
<symbol>LC_COLLATE</symbol> locale category.
</para>
</listitem>
</varlistentry>
@@ -108,8 +116,9 @@ CREATE COLLATION [ IF NOT EXISTS ] <replaceable>name</replaceable> FROM <replace
<listitem>
<para>
Use the specified operating system locale for
the <symbol>LC_CTYPE</symbol> locale category.
If <replaceable>provider</replaceable> is <literal>libc</literal>, use
the specified operating system locale for the <symbol>LC_CTYPE</symbol>
locale category.
</para>
</listitem>
</varlistentry>