Home Explore Blog CI



postgresql

4th chunk of `doc/src/sgml/ref/create_database.sgml`
cb43a9d90f822a8cd18b4da830964d1293bcf8bf57c9289c0000000100000fa1
 linkend="create-database-locale-provider"/> is
        <literal>libc</literal>, also sets the default collation order to use
        in the new database, overriding the setting <xref
        linkend="create-database-locale"/>.
       </para>
      </listitem>
     </varlistentry>
     <varlistentry id="create-database-lc-ctype">
      <term><replaceable class="parameter">lc_ctype</replaceable></term>
      <listitem>
       <para>
        Sets <literal>LC_CTYPE</literal> in the database server's operating
        system environment.  The default is the setting of <xref
        linkend="create-database-locale"/> if specified, otherwise the same
        setting as the template database.  See below for additional
        restrictions.
       </para>
       <para>
        If <xref linkend="create-database-locale-provider"/> is
        <literal>libc</literal>, also sets the default character
        classification to use in the new database, overriding the setting
        <xref linkend="create-database-locale"/>.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="create-database-builtin-locale">
      <term><replaceable class="parameter">builtin_locale</replaceable></term>
      <listitem>
       <para>
        Specifies the builtin provider locale for the database default
        collation order and character classification, overriding the setting
        <xref linkend="create-database-locale"/>.  The <link
        linkend="create-database-locale-provider">locale provider</link> must
        be <literal>builtin</literal>.  The default is the setting of <xref
        linkend="create-database-locale"/> if specified; otherwise the same
        setting as the template database.
       </para>
       <para>
        The locales available for the <literal>builtin</literal> provider are
        <literal>C</literal>, <literal>C.UTF-8</literal> and
        <literal>PG_UNICODE_FAST</literal>.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="create-database-icu-locale">
      <term><replaceable class="parameter">icu_locale</replaceable></term>
      <listitem>
       <para>
        Specifies the ICU locale (see <xref
        linkend="collation-managing-create-icu"/>) for the database default
        collation order and character classification, overriding the setting
        <xref linkend="create-database-locale"/>.  The <link
        linkend="create-database-locale-provider">locale provider</link> must be ICU.  The default
        is the setting of <xref linkend="create-database-locale"/> if
        specified; otherwise the same setting as the template database.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="create-database-icu-rules">
      <term><replaceable class="parameter">icu_rules</replaceable></term>
      <listitem>
       <para>
        Specifies additional collation rules to customize the behavior of the
        default collation of this database.  This is supported for ICU only.
        See <xref linkend="icu-tailoring-rules"/> for details.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="create-database-locale-provider">
      <term><replaceable>locale_provider</replaceable></term>

      <listitem>
       <para>
        Specifies the provider to use for the default collation in this
        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
        linkend="create-database-template"/>. See <xref
        linkend="locale-providers"/> for details.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="create-database-collation-version">
      <term><replaceable>collation_version</replaceable></term>

      <listitem>
       <para>
        Specifies the collation version

Title: CREATE DATABASE Parameters: Built-in and ICU Locale Settings
Summary
This section describes the `builtin_locale`, `icu_locale`, `icu_rules`, `locale_provider`, and `collation_version` parameters of the `CREATE DATABASE` command. It explains how to specify the locale provider (builtin, ICU, or libc), the locale to use for the built-in or ICU provider, and how to customize ICU collation behavior with additional rules. It also details how these parameters interact with the template database and other locale settings.