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.
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 EXISTSDo not throw an error if the collation does not exist. A notice is issued in this case.
nameThe name of the collation. The collation name can be schema-qualified.
CASCADEAutomatically drop objects that depend on the collation, and in turn all objects that depend on those objects (see Section 5.15).
RESTRICTRefuse 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 COLLATIONCompare versions
Source references
Full definition and evidence JSON
Definition sources
center · PostgreSQL 18 · wiki-repair-20261023:58cea45d52788afa62361d422e8dbcb455137bc914c53587d7a20bfe5a814d37
Text language: en · wiki-repair-20261023:58cea45d52788afa62361d422e8dbcb455137bc914c53587d7a20bfe5a814d37