DROP OPERATOR

|            DROP OPERATOR            |                       |            |                  |                             |
|:-----------------------------------:|-----------------------|------------|------------------|-----------------------------|
|[Prev](sql-dropmaterializedview.html)|[Up](sql-commands.html)|SQL Commands|[Home](index.html)| [Next](sql-dropopclass.html)|

---

[]()

## DROP OPERATOR

DROP OPERATOR — remove an operator

## Synopsis

```
DROP OPERATOR [ IF EXISTS ] name ( { left_type | NONE } , right_type ) [, ...] [ CASCADE | RESTRICT ]

```

## Description

`DROP OPERATOR` drops an existing operator from the database system. To execute this command you must be the owner of the operator.

## Parameters

`IF EXISTS`

 Do not throw an error if the operator does not exist. A notice is issued in this case.

*`name`*

 The name (optionally schema-qualified) of an existing operator.

*`left_type`*

 The data type of the operator's left operand; write `NONE` if the operator has no left operand.

*`right_type`*

 The data type of the operator's right operand.

`CASCADE`

 Automatically drop objects that depend on the operator (such as views using it), and in turn all objects that depend on those objects (see [Section 5.14](ddl-depend.html)).

`RESTRICT`

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

## Examples

 Remove the power operator `a^b` for type `integer`:

```
DROP OPERATOR ^ (integer, integer);

```

 Remove the bitwise-complement prefix operator `~b` for type `bit`:

```
DROP OPERATOR ~ (none, bit);

```

 Remove multiple operators in one command:

```
DROP OPERATOR ~ (none, bit), ^ (integer, integer);

```

## Compatibility

 There is no `DROP OPERATOR` statement in the SQL standard.

## See Also

[CREATE OPERATOR](sql-createoperator.html), [ALTER OPERATOR](sql-alteroperator.html)

---

|[Prev](sql-dropmaterializedview.html)|[Up](sql-commands.html)| [Next](sql-dropopclass.html)|
|:------------------------------------|:---------------------:|----------------------------:|
|       DROP MATERIALIZED VIEW        |  [Home](index.html)   |     DROP OPERATOR CLASS     |

 // \<![CDATA[ \<-- For SVG support if ('WebSocket' in window) { (function() { function refreshCSS() { var sheets = [].slice.call(document.getElementsByTagName("link")); var head = document.getElementsByTagName("head")[0]; for (var i = 0; i \< sheets.length; ++i) { var elem = sheets[i]; head.removeChild(elem); var rel = elem.rel; if (elem.href && typeof rel != "string" || rel.length == 0 || rel.toLowerCase() == "stylesheet") { var url = elem.href.replace(/(&|\\?)\_cacheOverride=\\d+/, ''); elem.href = url + (url.indexOf('?') \>= 0 ? '&' : '?') + '\_cacheOverride=' + (new Date().valueOf()); } head.appendChild(elem); } } var protocol = window.location.protocol === 'http:' ? 'ws://' : 'wss://'; var address = protocol + window.location.host + window.location.pathname + '/ws'; var socket = new WebSocket(address); socket.onmessage = function(msg) { if (msg.data == 'reload') window.location.reload(); else if (msg.data == 'refreshcss') refreshCSS(); }; console.log('Live reload enabled.'); })(); } // ]]\>