mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Add standard collation UNICODE
This adds a new predefined collation named UNICODE, which sorts by the default Unicode collation algorithm specifications, per SQL standard. This only works if ICU support is built. Reviewed-by: Jeff Davis <pgsql@j-davis.com> Discussion: https://www.postgresql.org/message-id/flat/1293e382-2093-a2bf-a397-c04e8f83d3c2@enterprisedb.com
This commit is contained in:
@ -659,9 +659,34 @@ SELECT * FROM test1 ORDER BY a || b COLLATE "fr_FR";
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Additionally, the SQL standard collation name <literal>ucs_basic</literal>
|
||||
is available for encoding <literal>UTF8</literal>. It is equivalent
|
||||
to <literal>C</literal> and sorts by Unicode code point.
|
||||
Additionally, two SQL standard collation names are available:
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><literal>unicode</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
This collation sorts using the Unicode Collation Algorithm with the
|
||||
Default Unicode Collation Element Table. It is available in all
|
||||
encodings. ICU support is required to use this collation. (This
|
||||
collation has the same behavior as the ICU root locale; see <xref
|
||||
linkend="collation-managing-predefined-icu-und-x-icu"/>.)
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><literal>ucs_basic</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
This collation sorts by Unicode code point. It is only available for
|
||||
encoding <literal>UTF8</literal>. (This collation has the same
|
||||
behavior as the libc locale specification <literal>C</literal> in
|
||||
<literal>UTF8</literal> encoding.)
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</sect3>
|
||||
|
||||
|
Reference in New Issue
Block a user