Home Explore Blog CI



postgresql

3rd chunk of `doc/src/sgml/ref/create_collation.sgml`
92c2660ae41ef7187924ff1eccba381264938ca1313eae80000000010000084a
 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 to be used
       by <command>pg_upgrade</command> for copying the version from an
       existing installation.
      </para>

      <para>
       See also <xref linkend="sql-altercollation"/> for how to handle
       collation version mismatches.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><replaceable>existing_collation</replaceable></term>

     <listitem>
      <para>
       The name of an existing collation to copy.  The new collation
       will have the same properties as the existing one, but it
       will be an independent object.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
 </refsect1>


 <refsect1 id="sql-createcollation-notes">
  <title>Notes</title>

  <para>
   <command>CREATE COLLATION</command> takes a <literal>SHARE ROW
   EXCLUSIVE</literal> lock, which is self-conflicting, on the
   <structname>pg_collation</structname> system catalog, so only one
   <command>CREATE COLLATION</command> command can run at a time.
  </para>

  <para>
   Use <command>DROP COLLATION</command> to remove user-defined collations.
  </para>


Title: CREATE COLLATION Parameters and Notes
Summary
This section describes the remaining parameters for the CREATE COLLATION command, including rules (collation customization for ICU), version (version string for the collation), and existing_collation (copying properties from an existing collation). It also provides notes on locking and dropping collations, stating that CREATE COLLATION takes a SHARE ROW EXCLUSIVE lock on the pg_collation system catalog, and DROP COLLATION is used to remove user-defined collations.