Description

To be able to create a collation, you must have privilege on the destination schema.

name

The name of the collation. The collation name can be schema-qualified. If it is not, the collation is defined in the current schema. The collation name must be unique within that schema. (The system catalogs can contain collations with the same name for other encodings, but these are ignored if the database encoding does not match.)

locale

This is a shortcut for setting LC_COLLATE and LC_CTYPE at once. If you specify this, you cannot specify either of those parameters.

lc_collate

lc_ctype

Use the specified operating system locale for the LC_CTYPE locale category. The locale must be applicable to the current database encoding. (See for the precise rules.)

existing_collation

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.

Notes

To be able to create a collation, you must have CREATE privilege on the destination schema.

Use to remove user-defined collations.

To create a collation from the operating system locale fr_FR.utf8 (assuming the current database encoding is UTF8):

To create a collation from an existing collation:

This can be convenient to be able to use operating-system-independent collation names in applications.

Compatibility

There is a statement in the SQL standard, but it is limited to copying an existing collation. The syntax to create a new collation is a Greenplum Database extension.

ALTER COLLATION,

Parent topic: SQL Commands