Skip to main content
Version: 0.9.1

3.13. Collations

Collations are objects which allow specifying the sorting mode and character classification behavior either per column or operation. Collations can be used to override the way data is sorted in a database even if this one has its own mode defined by LC_COLLATE and LC_CTYPE attributes.

AttributeDescription
CollationThis field can be used to create a new object from an existing collation.
LocaleThis is a shortcut to specify the attributes LC_COLLATE and LC_CTYPE.
EncodingCharset in which the collation works.
LC_COLLATESpecify in which language the string sorting must be applied.
LC_CTYPESpecify in which language the character categorization (upper, lower and digit) must be applied.

note

Note: the attributes Collation, Locale, LC_COLLATE and LC_CTYPE are mutually exclusive, thus you can't use all of them at once.

References​

** Collation DDL **

https://www.postgresql.org/docs/current/static/sql-createcollation.html