The code to unlink dropped relations in FinishPreparedTransaction() was
[PostgreSQL.git] / doc / src / sgml / ref / drop_opfamily.sgml
blobfeee76cefb2f603a98671950acec5d9e86ae2ac8
1 <!--
2 $PostgreSQL$
3 PostgreSQL documentation
4 -->
6 <refentry id="SQL-DROPOPFAMILY">
7 <refmeta>
8 <refentrytitle id="SQL-DROPOPFAMILY-TITLE">DROP OPERATOR FAMILY</refentrytitle>
9 <manvolnum>7</manvolnum>
10 <refmiscinfo>SQL - Language Statements</refmiscinfo>
11 </refmeta>
13 <refnamediv>
14 <refname>DROP OPERATOR FAMILY</refname>
15 <refpurpose>remove an operator family</refpurpose>
16 </refnamediv>
18 <indexterm zone="sql-dropopfamily">
19 <primary>DROP OPERATOR FAMILY</primary>
20 </indexterm>
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>
28 <refsect1>
29 <title>Description</title>
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>
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>
45 <refsect1>
46 <title>Parameters</title>
48 <variablelist>
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>
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>
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>
78 <varlistentry>
79 <term><literal>CASCADE</literal></term>
80 <listitem>
81 <para>
82 Automatically drop objects that depend on the operator family.
83 </para>
84 </listitem>
85 </varlistentry>
87 <varlistentry>
88 <term><literal>RESTRICT</literal></term>
89 <listitem>
90 <para>
91 Refuse to drop the operator family if any objects depend on it.
92 This is the default.
93 </para>
94 </listitem>
95 </varlistentry>
96 </variablelist>
97 </refsect1>
99 <refsect1>
100 <title>Examples</title>
102 <para>
103 Remove the B-tree operator family <literal>float_ops</literal>:
105 <programlisting>
106 DROP OPERATOR FAMILY float_ops USING btree;
107 </programlisting>
109 This command will not succeed if there are any existing indexes
110 that use operator classes within the family. Add <literal>CASCADE</> to
111 drop such indexes along with the operator family.
112 </para>
113 </refsect1>
115 <refsect1>
116 <title>Compatibility</title>
118 <para>
119 There is no <command>DROP OPERATOR FAMILY</command> statement in the
120 SQL standard.
121 </para>
122 </refsect1>
124 <refsect1>
125 <title>See Also</title>
127 <simplelist type="inline">
128 <member><xref linkend="sql-alteropfamily" endterm="sql-alteropfamily-title"></member>
129 <member><xref linkend="sql-createopfamily" endterm="sql-createopfamily-title"></member>
130 <member><xref linkend="sql-alteropclass" endterm="sql-alteropclass-title"></member>
131 <member><xref linkend="sql-createopclass" endterm="sql-createopclass-title"></member>
132 <member><xref linkend="sql-dropopclass" endterm="sql-dropopclass-title"></member>
133 </simplelist>
134 </refsect1>
136 </refentry>