]> granicus.if.org Git - postgresql/blob - doc/src/sgml/ref/drop_opfamily.sgml
Trim trailing whitespace
[postgresql] / doc / src / sgml / ref / drop_opfamily.sgml
1 <!--
2 doc/src/sgml/ref/drop_opfamily.sgml
3 PostgreSQL documentation
4 -->
5
6 <refentry id="SQL-DROPOPFAMILY">
7  <indexterm zone="sql-dropopfamily">
8   <primary>DROP OPERATOR FAMILY</primary>
9  </indexterm>
10
11  <refmeta>
12   <refentrytitle>DROP OPERATOR FAMILY</refentrytitle>
13   <manvolnum>7</manvolnum>
14   <refmiscinfo>SQL - Language Statements</refmiscinfo>
15  </refmeta>
16
17  <refnamediv>
18   <refname>DROP OPERATOR FAMILY</refname>
19   <refpurpose>remove an operator family</refpurpose>
20  </refnamediv>
21
22  <refsynopsisdiv>
23 <synopsis>
24 DROP OPERATOR FAMILY [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> USING <replaceable class="PARAMETER">index_method</replaceable> [ CASCADE | RESTRICT ]
25 </synopsis>
26  </refsynopsisdiv>
27
28  <refsect1>
29   <title>Description</title>
30
31   <para>
32    <command>DROP OPERATOR FAMILY</command> drops an existing operator family.
33    To execute this command you must be the owner of the operator family.
34   </para>
35
36   <para>
37    <command>DROP OPERATOR FAMILY</command> includes dropping any operator
38    classes contained in the family, but it does not drop any of the operators
39    or functions referenced by the family.  If there are any indexes depending
40    on operator classes within the family, you will need to specify
41    <literal>CASCADE</> for the drop to complete.
42   </para>
43  </refsect1>
44
45  <refsect1>
46   <title>Parameters</title>
47
48   <variablelist>
49
50    <varlistentry>
51     <term><literal>IF EXISTS</literal></term>
52     <listitem>
53      <para>
54       Do not throw an error if the operator family does not exist.
55       A notice is issued in this case.
56      </para>
57     </listitem>
58    </varlistentry>
59
60    <varlistentry>
61     <term><replaceable class="parameter">name</replaceable></term>
62     <listitem>
63      <para>
64       The name (optionally schema-qualified) of an existing operator family.
65      </para>
66     </listitem>
67    </varlistentry>
68
69    <varlistentry>
70     <term><replaceable class="parameter">index_method</replaceable></term>
71     <listitem>
72      <para>
73       The name of the index access method the operator family is for.
74      </para>
75     </listitem>
76    </varlistentry>
77
78    <varlistentry>
79     <term><literal>CASCADE</literal></term>
80     <listitem>
81      <para>
82       Automatically drop objects that depend on the operator family,
83       and in turn all objects that depend on those objects
84       (see <xref linkend="ddl-depend">).
85      </para>
86     </listitem>
87    </varlistentry>
88
89    <varlistentry>
90     <term><literal>RESTRICT</literal></term>
91     <listitem>
92      <para>
93       Refuse to drop the operator family if any objects depend on it.
94       This is the default.
95      </para>
96     </listitem>
97    </varlistentry>
98   </variablelist>
99  </refsect1>
100
101  <refsect1>
102   <title>Examples</title>
103
104   <para>
105    Remove the B-tree operator family <literal>float_ops</literal>:
106
107 <programlisting>
108 DROP OPERATOR FAMILY float_ops USING btree;
109 </programlisting>
110
111    This command will not succeed if there are any existing indexes
112    that use operator classes within the family.  Add <literal>CASCADE</> to
113    drop such indexes along with the operator family.
114   </para>
115  </refsect1>
116
117  <refsect1>
118   <title>Compatibility</title>
119
120   <para>
121    There is no <command>DROP OPERATOR FAMILY</command> statement in the
122    SQL standard.
123   </para>
124  </refsect1>
125
126  <refsect1>
127   <title>See Also</title>
128
129   <simplelist type="inline">
130    <member><xref linkend="sql-alteropfamily"></member>
131    <member><xref linkend="sql-createopfamily"></member>
132    <member><xref linkend="sql-alteropclass"></member>
133    <member><xref linkend="sql-createopclass"></member>
134    <member><xref linkend="sql-dropopclass"></member>
135   </simplelist>
136  </refsect1>
137
138 </refentry>