1DROP OPERATOR CLASS(7)  PostgreSQL 9.2.24 Documentation DROP OPERATOR CLASS(7)
2
3
4

NAME

6       DROP_OPERATOR_CLASS - remove an operator class
7

SYNOPSIS

9       DROP OPERATOR CLASS [ IF EXISTS ] name USING index_method [ CASCADE | RESTRICT ]
10

DESCRIPTION

12       DROP OPERATOR CLASS drops an existing operator class. To execute this
13       command you must be the owner of the operator class.
14
15       DROP OPERATOR CLASS does not drop any of the operators or functions
16       referenced by the class. If there are any indexes depending on the
17       operator class, you will need to specify CASCADE for the drop to
18       complete.
19

PARAMETERS

21       IF EXISTS
22           Do not throw an error if the operator class does not exist. A
23           notice is issued in this case.
24
25       name
26           The name (optionally schema-qualified) of an existing operator
27           class.
28
29       index_method
30           The name of the index access method the operator class is for.
31
32       CASCADE
33           Automatically drop objects that depend on the operator class.
34
35       RESTRICT
36           Refuse to drop the operator class if any objects depend on it. This
37           is the default.
38

NOTES

40       DROP OPERATOR CLASS will not drop the operator family containing the
41       class, even if there is nothing else left in the family (in particular,
42       in the case where the family was implicitly created by CREATE OPERATOR
43       CLASS). An empty operator family is harmless, but for the sake of
44       tidiness you might wish to remove the family with DROP OPERATOR FAMILY;
45       or perhaps better, use DROP OPERATOR FAMILY in the first place.
46

EXAMPLES

48       Remove the B-tree operator class widget_ops:
49
50           DROP OPERATOR CLASS widget_ops USING btree;
51
52       This command will not succeed if there are any existing indexes that
53       use the operator class. Add CASCADE to drop such indexes along with the
54       operator class.
55

COMPATIBILITY

57       There is no DROP OPERATOR CLASS statement in the SQL standard.
58

SEE ALSO

60       ALTER OPERATOR CLASS (ALTER_OPERATOR_CLASS(7)), CREATE OPERATOR CLASS
61       (CREATE_OPERATOR_CLASS(7)), DROP OPERATOR FAMILY
62       (DROP_OPERATOR_FAMILY(7))
63
64
65
66PostgreSQL 9.2.24                 2017-11-06            DROP OPERATOR CLASS(7)
Impressum