Home Explore Blog CI



postgresql

2nd chunk of `doc/src/sgml/ref/create_collation.sgml`
c3eae279654d1de69a05fed47ed0452fceb26cf37d9983680000000100000cb3
 specify
       <replaceable>locale</replaceable>, you cannot specify either of those
       parameters.
      </para>
      <para>
       If <replaceable>provider</replaceable> is <literal>builtin</literal>,
       then <replaceable>locale</replaceable> must be specified and set to
       either <literal>C</literal>, <literal>C.UTF-8</literal> or
       <literal>PG_UNICODE_FAST</literal>.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><replaceable>lc_collate</replaceable></term>

     <listitem>
      <para>
       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>

    <varlistentry>
     <term><replaceable>lc_ctype</replaceable></term>

     <listitem>
      <para>
       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>

    <varlistentry>
     <term><replaceable>provider</replaceable></term>

     <listitem>
      <para>
       Specifies the provider to use for locale services associated with this
       collation.  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>.
       <literal>libc</literal> is the default.  See <xref
       linkend="locale-providers"/> for details.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><literal>DETERMINISTIC</literal></term>

     <listitem>
      <para>
       Specifies whether the collation should use deterministic comparisons.
       The default is true.  A deterministic comparison considers strings that
       are not byte-wise equal to be unequal even if they are considered
       logically equal by the comparison.  PostgreSQL breaks ties using a
       byte-wise comparison.  Comparison that is not deterministic can make the
       collation be, say, case- or accent-insensitive.  For that, you need to
       choose an appropriate <literal>LOCALE</literal> setting
       <emphasis>and</emphasis> set the collation to not deterministic here.
      </para>

      <para>
       Nondeterministic collations are only supported with the ICU provider.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><replaceable>rules</replaceable></term>

     <listitem>
      <para>
       Specifies additional collation rules to customize the behavior of the
       collation.  This is supported for ICU only.  See <xref
       linkend="icu-tailoring-rules"/> for details.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><replaceable>version</replaceable></term>

     <listitem>
      <para>
       Specifies the version string to store with the collation.  Normally,
       this should be omitted, which will cause the version to be computed
       from the actual version of the collation as provided by the operating
       system.  This option is intended

Title: CREATE COLLATION Parameters (Continued)
Summary
This section details the parameters for the CREATE COLLATION command, including lc_ctype (specifying the operating system locale for the LC_CTYPE locale category), provider (specifying the locale services provider like 'builtin', 'icu', or 'libc'), DETERMINISTIC (indicating whether comparisons should be deterministic), rules (specifying additional collation rules for ICU), and version (specifying a version string to store with the collation).