1DROP OPERATOR CLASS(7)           SQL Commands           DROP OPERATOR CLASS(7)
2
3
4

NAME

6       DROP OPERATOR CLASS - remove an operator class
7
8

SYNOPSIS

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

DESCRIPTION

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

PARAMETERS

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

NOTES

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

EXAMPLES

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

COMPATIBILITY

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

SEE ALSO

61       ALTER  OPERATOR  CLASS [alter_operator_class(7)], CREATE OPERATOR CLASS
62       [create_operator_class(7)], DROP  OPERATOR  FAMILY  [drop_operator_fam‐
63       ily(7)]
64
65
66
67SQL - Language Statements         2014-02-17            DROP OPERATOR CLASS(7)
Impressum