2 doc/src/sgml/ref/drop_opfamily.sgml
3 PostgreSQL documentation
6 <refentry id="SQL-DROPOPFAMILY">
7 <indexterm zone="sql-dropopfamily">
8 <primary>DROP OPERATOR FAMILY</primary>
12 <refentrytitle>DROP OPERATOR FAMILY</refentrytitle>
13 <manvolnum>7</manvolnum>
14 <refmiscinfo>SQL - Language Statements</refmiscinfo>
18 <refname>DROP OPERATOR FAMILY</refname>
19 <refpurpose>remove an operator family</refpurpose>
24 DROP OPERATOR FAMILY [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> USING <replaceable class="PARAMETER">index_method</replaceable> [ CASCADE | RESTRICT ]
29 <title>Description</title>
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.
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.
46 <title>Parameters</title>
51 <term><literal>IF EXISTS</literal></term>
54 Do not throw an error if the operator family does not exist.
55 A notice is issued in this case.
61 <term><replaceable class="parameter">name</replaceable></term>
64 The name (optionally schema-qualified) of an existing operator family.
70 <term><replaceable class="parameter">index_method</replaceable></term>
73 The name of the index access method the operator family is for.
79 <term><literal>CASCADE</literal></term>
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">).
90 <term><literal>RESTRICT</literal></term>
93 Refuse to drop the operator family if any objects depend on it.
102 <title>Examples</title>
105 Remove the B-tree operator family <literal>float_ops</literal>:
108 DROP OPERATOR FAMILY float_ops USING btree;
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.
118 <title>Compatibility</title>
121 There is no <command>DROP OPERATOR FAMILY</command> statement in the
127 <title>See Also</title>
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>