1DROP OPERATOR(7) PostgreSQL 14.3 Documentation DROP OPERATOR(7)
2
3
4
6 DROP_OPERATOR - remove an operator
7
9 DROP OPERATOR [ IF EXISTS ] name ( { left_type | NONE } , right_type ) [, ...] [ CASCADE | RESTRICT ]
10
12 DROP OPERATOR drops an existing operator from the database system. To
13 execute this command you must be the owner of the operator.
14
16 IF EXISTS
17 Do not throw an error if the operator does not exist. A notice is
18 issued in this case.
19
20 name
21 The name (optionally schema-qualified) of an existing operator.
22
23 left_type
24 The data type of the operator's left operand; write NONE if the
25 operator has no left operand.
26
27 right_type
28 The data type of the operator's right operand.
29
30 CASCADE
31 Automatically drop objects that depend on the operator (such as
32 views using it), and in turn all objects that depend on those
33 objects (see Section 5.14).
34
35 RESTRICT
36 Refuse to drop the operator if any objects depend on it. This is
37 the default.
38
40 Remove the power operator a^b for type integer:
41
42 DROP OPERATOR ^ (integer, integer);
43
44 Remove the bitwise-complement prefix operator ~b for type bit:
45
46 DROP OPERATOR ~ (none, bit);
47
48 Remove multiple operators in one command:
49
50 DROP OPERATOR ~ (none, bit), ^ (integer, integer);
51
53 There is no DROP OPERATOR statement in the SQL standard.
54
56 CREATE OPERATOR (CREATE_OPERATOR(7)), ALTER OPERATOR
57 (ALTER_OPERATOR(7))
58
59
60
61PostgreSQL 14.3 2022 DROP OPERATOR(7)