↑↓ select↵ open⌫ change scopeOpen full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Wiki / SQL Commands

DROP COLLATION

remove a collation

English manual coverage begins with PostgreSQL 6.4. Source history and runtime observations have their own recorded version boundaries.

Reading PG 18·Select a recorded version

anchor
SQL-DROPCOLLATION
file
sql-dropcollation.html
lang
en
name
DROP COLLATION
purpose
remove a collation
purpose zh
删除一个排序规则
sections same as
Unknown
slug
18
synopsis html
DROP COLLATION [ IF EXISTS ] <em class="replaceable"><code>name</code></em> [ CASCADE | RESTRICT ]
synopsis text
DROP COLLATION [ IF EXISTS ] name [ CASCADE | RESTRICT ]

Syntax

DROP COLLATION [ IF EXISTS ] name [ CASCADE | RESTRICT ]
Syntax diagrams

Read left to right. Branches are choices, bypasses are optional, loops repeat. Select an underlined parameter to open its rule.

DROP COLLATION IF EXISTS name CASCADE RESTRICT

Definition PG 18

DROP COLLATION [ IF EXISTS ] name [ CASCADE | RESTRICT ]

Description

DROP COLLATION removes a previously defined collation. To be able to drop a collation, you must own the collation.

Parameters

IF EXISTS

Do not throw an error if the collation does not exist. A notice is issued in this case.

name

The name of the collation. The collation name can be schema-qualified.

CASCADE

Automatically drop objects that depend on the collation, and in turn all objects that depend on those objects (see Section 5.15).

RESTRICT

Refuse to drop the collation if any objects depend on it. This is the default.

Examples

To drop the collation named german:

DROP COLLATION german;

Compatibility

The DROP COLLATION command conforms to the SQL standard, apart from the IF EXISTS option, which is a PostgreSQL extension.

See Also

ALTER COLLATION, CREATE COLLATION

Compare versions

Source references

Full definition and evidence JSON

Definition sources

center · PostgreSQL 18 · wiki-repair-20261023:58cea45d52788afa62361d422e8dbcb455137bc914c53587d7a20bfe5a814d37

Text language: en · wiki-repair-20261023:58cea45d52788afa62361d422e8dbcb455137bc914c53587d7a20bfe5a814d37