mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
Introduce "builtin" collation provider.
New provider for collations, like "libc" or "icu", but without any external dependency. Initially, the only locale supported by the builtin provider is "C", which is identical to the libc provider's "C" locale. The libc provider's "C" locale has always been treated as a special case that uses an internal implementation, without using libc at all -- so the new builtin provider uses the same implementation. The builtin provider's locale is independent of the server environment variables LC_COLLATE and LC_CTYPE. Using the builtin provider, the database collation locale can be "C" while LC_COLLATE and LC_CTYPE are set to "en_US", which is impossible with the libc provider. By offering a new builtin provider, it clarifies that the semantics of a collation using this provider will never depend on libc, and makes it easier to document the behavior. Discussion: https://postgr.es/m/ab925f69-5f9d-f85e-b87c-bd2a44798659@joeconway.com Discussion: https://postgr.es/m/dd9261f4-7a98-4565-93ec-336c1c110d90@manitou-mail.org Discussion: https://postgr.es/m/ff4c2f2f9c8fc7ca27c1c24ae37ecaeaeaff6b53.camel%40j-davis.com Reviewed-by: Daniel Vérité, Peter Eisentraut, Jeremy Schneider
This commit is contained in:
@@ -162,6 +162,11 @@ CREATE DATABASE <replaceable class="parameter">name</replaceable>
|
||||
linkend="create-database-lc-ctype"/>, or <xref
|
||||
linkend="create-database-icu-locale"/> individually.
|
||||
</para>
|
||||
<para>
|
||||
If <xref linkend="create-database-locale-provider"/> is
|
||||
<literal>builtin</literal>, then <replaceable>locale</replaceable>
|
||||
must be specified and set to <literal>C</literal>.
|
||||
</para>
|
||||
<tip>
|
||||
<para>
|
||||
The other locale settings <xref linkend="guc-lc-messages"/>, <xref
|
||||
@@ -243,7 +248,7 @@ CREATE DATABASE <replaceable class="parameter">name</replaceable>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the provider to use for the default collation in this
|
||||
database. Possible values are
|
||||
database. Possible values are <literal>builtin</literal>,
|
||||
<literal>icu</literal><indexterm><primary>ICU</primary></indexterm>
|
||||
(if the server was built with ICU support) or <literal>libc</literal>.
|
||||
By default, the provider is the same as that of the <xref
|
||||
|
||||
Reference in New Issue
Block a user