Postgresql 中文操作指南

DROP COLLATION

删除比较——删除一个比较

DROP COLLATION — remove a collation

Synopsis

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

Description

DROP COLLATION 删除先前定义的比较。若要能够删除比较,你必须拥有该比较。

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.14).

  • RESTRICT

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

Examples

删除名为 german 的排序规则:

To drop the collation named german:

DROP COLLATION german;

Compatibility

DROP COLLATION 命令遵循 SQL 标准,除了 IF EXISTS 选项以外,该选项是 PostgreSQL 扩展。

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