Updated on 2025-02-27 GMT+08:00

DROP OPERATOR

Description

Drops an operator object.

Precautions

DROP OPERATOR drops the definition of an operator. To use DROP OPERATOR, you must be the owner of the operator.

Syntax

DROP OPERATOR [ IF EXISTS ] name ( { lefttype | NONE } , { righttype | NONE } ) [ CASCADE | RESTRICT ] 

Parameters

  • IF EXISTS

    Reports a notice instead of an error if the operator does not exist.

  • name

    Name (optionally schema-qualified) of an existing operator.

  • lefttype

    Type of the left operand of an operator. If there is no left operand, NONE is used.

  • righttype

    Type of the right operand of an operator. If there is no right operand, NONE is used.

  • CASCADE

    Automatically drops objects that depend on an operator (such as views that use the operator), and then drops all objects that depend on those objects.

  • RESTRICT

    Refuses to drop any object that depends on an operator. This is the default value.

Helpful Links

ALTER OPERATOR and CREATE OPERATOR