DROP OPCLASS statement

Use the DROP OPCLASS statement to remove an existing operator class from the database.

This statement is an extension to the ANSI/ISO standard for SQL.

Syntax

DROP OPCLASS [IF EXISTS] [ owner . ] opclass RESTRICT
Element Description Restrictions Syntax
opclass Name of operator class to be dropped Must have been created by a previous CREATE OPCLASS statement Identifier
owner Name of opclass owner Must own the operator class Owner name

Usage

You must be the owner of the operator class or have the DBA privilege to use the DROP OPCLASS statement.

If you include the optional IF EXISTS keywords, the database server takes no action (rather than sending an exception to the application) if no operator class of the specified name is registered in the current database.

The RESTRICT keyword causes DROP OPCLASS to fail if the database contains indexes defined on the operator class that you plan to drop. Therefore, before you drop the operator class, you must use the DROP INDEX statement to drop any dependent indexes.

The following DROP OPCLASS statement drops an operator class called abs_btree_ops:
DROP OPCLASS abs_btree_ops RESTRICT

If you include the optional IF EXISTS keywords, the database server takes no action (rather than sending an exception to the application) if no function of the specified name (or of the specified specific name, if you include the SPECIFIC keyword) is registered in the current database.