]> begriffs open source - ai-pg/blob - full-docs/man7/DROP_OPERATOR_CLASS.7
Include links to all subsection html pages, with shorter paths too
[ai-pg] / full-docs / man7 / DROP_OPERATOR_CLASS.7
1 '\" t
2 .\"     Title: DROP OPERATOR CLASS
3 .\"    Author: The PostgreSQL Global Development Group
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\"      Date: 2025
6 .\"    Manual: PostgreSQL 18.0 Documentation
7 .\"    Source: PostgreSQL 18.0
8 .\"  Language: English
9 .\"
10 .TH "DROP OPERATOR CLASS" "7" "2025" "PostgreSQL 18.0" "PostgreSQL 18.0 Documentation"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 DROP_OPERATOR_CLASS \- remove an operator class
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 DROP OPERATOR CLASS [ IF EXISTS ] \fIname\fR USING \fIindex_method\fR [ CASCADE | RESTRICT ]
36 .fi
37 .SH "DESCRIPTION"
38 .PP
39 \fBDROP OPERATOR CLASS\fR
40 drops an existing operator class\&. To execute this command you must be the owner of the operator class\&.
41 .PP
42 \fBDROP OPERATOR CLASS\fR
43 does not drop any of the operators or functions referenced by the class\&. If there are any indexes depending on the operator class, you will need to specify
44 CASCADE
45 for the drop to complete\&.
46 .SH "PARAMETERS"
47 .PP
48 IF EXISTS
49 .RS 4
50 Do not throw an error if the operator class does not exist\&. A notice is issued in this case\&.
51 .RE
52 .PP
53 \fIname\fR
54 .RS 4
55 The name (optionally schema\-qualified) of an existing operator class\&.
56 .RE
57 .PP
58 \fIindex_method\fR
59 .RS 4
60 The name of the index access method the operator class is for\&.
61 .RE
62 .PP
63 CASCADE
64 .RS 4
65 Automatically drop objects that depend on the operator class (such as indexes), and in turn all objects that depend on those objects (see
66 Section\ \&5.15)\&.
67 .RE
68 .PP
69 RESTRICT
70 .RS 4
71 Refuse to drop the operator class if any objects depend on it\&. This is the default\&.
72 .RE
73 .SH "NOTES"
74 .PP
75 \fBDROP OPERATOR CLASS\fR
76 will not drop the operator family containing the class, even if there is nothing else left in the family (in particular, in the case where the family was implicitly created by
77 \fBCREATE OPERATOR CLASS\fR)\&. An empty operator family is harmless, but for the sake of tidiness you might wish to remove the family with
78 \fBDROP OPERATOR FAMILY\fR; or perhaps better, use
79 \fBDROP OPERATOR FAMILY\fR
80 in the first place\&.
81 .SH "EXAMPLES"
82 .PP
83 Remove the B\-tree operator class
84 widget_ops:
85 .sp
86 .if n \{\
87 .RS 4
88 .\}
89 .nf
90 DROP OPERATOR CLASS widget_ops USING btree;
91 .fi
92 .if n \{\
93 .RE
94 .\}
95 .sp
96 This command will not succeed if there are any existing indexes that use the operator class\&. Add
97 CASCADE
98 to drop such indexes along with the operator class\&.
99 .SH "COMPATIBILITY"
100 .PP
101 There is no
102 \fBDROP OPERATOR CLASS\fR
103 statement in the SQL standard\&.
104 .SH "SEE ALSO"
105 ALTER OPERATOR CLASS (\fBALTER_OPERATOR_CLASS\fR(7)), CREATE OPERATOR CLASS (\fBCREATE_OPERATOR_CLASS\fR(7)), DROP OPERATOR FAMILY (\fBDROP_OPERATOR_FAMILY\fR(7))