2 doc/src/sgml/ref/drop_extension.sgml
3 PostgreSQL documentation
6 <refentry id="SQL-DROPEXTENSION">
8 <refentrytitle>DROP EXTENSION</refentrytitle>
9 <manvolnum>7</manvolnum>
10 <refmiscinfo>SQL - Language Statements</refmiscinfo>
14 <refname>DROP EXTENSION</refname>
15 <refpurpose>remove an extension</refpurpose>
18 <indexterm zone="sql-dropextension">
19 <primary>DROP EXTENSION</primary>
24 DROP EXTENSION [ IF EXISTS ] <replaceable class="PARAMETER">extension_name</replaceable> [, ...] [ CASCADE | RESTRICT ]
29 <title>Description</title>
32 <command>DROP EXTENSION</command> removes extensions from the database.
33 Dropping an extension causes its component objects to be dropped as well.
37 You must own the extension to use <command>DROP EXTENSION</command>.
42 <title>Parameters</title>
47 <term><literal>IF EXISTS</literal></term>
50 Do not throw an error if the extension does not exist. A notice is issued
57 <term><replaceable class="PARAMETER">extension_name</replaceable></term>
60 The name of an installed extension.
66 <term><literal>CASCADE</literal></term>
69 Automatically drop objects that depend on the extension.
75 <term><literal>RESTRICT</literal></term>
78 Refuse to drop the extension if any objects depend on it (other than
79 its own member objects and other extensions listed in the same
80 <command>DROP</> command). This is the default.
88 <title>Examples</title>
91 To remove the extension <literal>hstore</literal> from the current
94 DROP EXTENSION hstore;
96 This command will fail if any of <literal>hstore</literal>'s objects
97 are in use in the database, for example if any tables have columns
98 of the <type>hstore</> type. Add the <literal>CASCADE</> option to
99 forcibly remove those dependent objects as well.
104 <title>Compatibility</title>
107 <command>DROP EXTENSION</command> is a <productname>PostgreSQL</>
113 <title>See Also</title>
115 <simplelist type="inline">
116 <member><xref linkend="sql-createextension"></member>
117 <member><xref linkend="sql-alterextension"></member>