Specific Attributes
The CREATE COLLATION
statement can also include specific attributes to configure the collation.The available specific attributes are listed in the table below.Not all specific attributes apply to every collation.If the attribute is not applicable to the collation, but is specified when creating it, it will not cause an error.
Important
|
Specific attribute names are case-sensitive. |
In the table, “1 bpc” indicates that an attribute is valid for collations of character sets using 1 byte per character (so-called narrow character sets), and “UNI” for “Unicode collations”.
Atrribute | Values | Valid for | Comment |
---|---|---|---|
|
|
1 bpc, UNI |
Disables compressions (a.k.a. contractions).Compressions cause certain character sequences to be sorted as atomic units, e.g. Spanish c+h as a single character ch |
|
|
1 bpc |
Disables expansions.Expansions cause certain characters (e.g. ligatures or umlauted vowels) to be treated as character sequences and sorted accordingly |
|
default or M.m |
UNI |
Specifies the ICU library version to use.Valid values are the ones defined in the applicable |
|
xx_YY |
UNI |
Specifies the collation locale.Requires complete version of ICU libraries.Format: a locale string like “du_NL” (unquoted) |
|
|
1 bpc |
Uses more than one ordering level |
|
|
UNI |
Treats contiguous groups of decimal digits in the string as atomic units and sorts them numerically.(This is also known as natural sorting) |
|
|
1 bpc |
Orders special characters (spaces, symbols etc.) before alphanumeric characters |
Tip
|
If you want to add a new character set with its default collation into your database, declare and run the stored procedure In order for this to work, the character set must be present on the system and registered in a |