DROP OPERATOR

Name

DROP OPERATOR  --  Removes an operator from the database.

Synopsis

DROP OPERATOR id
   ( lefttype | NONE, 
   righttype | NONE)
 

Parameters

id

Use this parameter to provide the identifier of an existing operator you wish to remove.

lefttype

This parameter takes the operator's left argument type (use "NONE" if the operator does not have a left argument).

righttype

This parameter takes the operator's left argument type (use "NONE" if the operator does not have a left argument).

Results

DROP

This message is displayed if the command is successful.

ERROR: RemoveOperator: binary operator 'oper' taking 'type' and 'type2' does not exist

This error is displayed if the binary operator you specified does not exist.

ERROR: RemoveOperator: left unary operator 'oper' taking 'type' does not exist

This message is displayed if the operator you specified does not exist.

ERROR: RemoveOperator: right unary operator 'oper' taking 'type' does not exist

This message is displayed if the right unary operator you specified does not exist.

Description

Use the DROP OPERATOR command to remove an existing operator from the database. This command can only be used upon an operator if the current user is the owner.

NoteWarning
 

Removing an operator that has access methods or operator classes which rely on it can cause problems; make sure you note what these classes and methods are (if anything relies on this operator) before dropping it.

Examples

The following example drops the addition operator (+) for int4.

DROP OPERATOR + (int4, int4);