2011-02-08 22:08:41 +01:00
|
|
|
|
<!--
|
|
|
|
|
doc/src/sgml/ref/drop_extension.sgml
|
|
|
|
|
PostgreSQL documentation
|
|
|
|
|
-->
|
|
|
|
|
|
2017-10-20 03:16:39 +02:00
|
|
|
|
<refentry id="sql-dropextension">
|
2014-02-24 03:25:35 +01:00
|
|
|
|
<indexterm zone="sql-dropextension">
|
|
|
|
|
<primary>DROP EXTENSION</primary>
|
|
|
|
|
</indexterm>
|
|
|
|
|
|
2011-02-08 22:08:41 +01:00
|
|
|
|
<refmeta>
|
|
|
|
|
<refentrytitle>DROP EXTENSION</refentrytitle>
|
|
|
|
|
<manvolnum>7</manvolnum>
|
|
|
|
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
|
|
|
|
</refmeta>
|
|
|
|
|
|
|
|
|
|
<refnamediv>
|
|
|
|
|
<refname>DROP EXTENSION</refname>
|
|
|
|
|
<refpurpose>remove an extension</refpurpose>
|
|
|
|
|
</refnamediv>
|
|
|
|
|
|
|
|
|
|
<refsynopsisdiv>
|
|
|
|
|
<synopsis>
|
2017-10-09 04:00:57 +02:00
|
|
|
|
DROP EXTENSION [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [, ...] [ CASCADE | RESTRICT ]
|
2011-02-08 22:08:41 +01:00
|
|
|
|
</synopsis>
|
|
|
|
|
</refsynopsisdiv>
|
|
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
|
<title>Description</title>
|
|
|
|
|
|
|
|
|
|
<para>
|
|
|
|
|
<command>DROP EXTENSION</command> removes extensions from the database.
|
2022-08-12 15:06:48 +02:00
|
|
|
|
Dropping an extension causes its member objects, and other explicitly
|
2022-07-14 23:41:03 +02:00
|
|
|
|
dependent routines (see <xref linkend="sql-alterroutine"/>,
|
2022-08-04 10:29:25 +02:00
|
|
|
|
the <literal>DEPENDS ON EXTENSION <replaceable>extension_name</replaceable>
|
|
|
|
|
</literal> action), to be dropped as well.
|
2011-02-08 22:08:41 +01:00
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
<para>
|
2011-03-04 22:08:24 +01:00
|
|
|
|
You must own the extension to use <command>DROP EXTENSION</command>.
|
2011-02-08 22:08:41 +01:00
|
|
|
|
</para>
|
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
|
<title>Parameters</title>
|
|
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
|
<term><literal>IF EXISTS</literal></term>
|
|
|
|
|
<listitem>
|
|
|
|
|
<para>
|
|
|
|
|
Do not throw an error if the extension does not exist. A notice is issued
|
|
|
|
|
in this case.
|
|
|
|
|
</para>
|
|
|
|
|
</listitem>
|
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
|
|
<varlistentry>
|
2017-10-09 04:00:57 +02:00
|
|
|
|
<term><replaceable class="parameter">name</replaceable></term>
|
2011-02-08 22:08:41 +01:00
|
|
|
|
<listitem>
|
|
|
|
|
<para>
|
|
|
|
|
The name of an installed extension.
|
|
|
|
|
</para>
|
|
|
|
|
</listitem>
|
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
|
<term><literal>CASCADE</literal></term>
|
|
|
|
|
<listitem>
|
|
|
|
|
<para>
|
2016-08-13 00:45:18 +02:00
|
|
|
|
Automatically drop objects that depend on the extension,
|
|
|
|
|
and in turn all objects that depend on those objects
|
2017-11-23 15:39:47 +01:00
|
|
|
|
(see <xref linkend="ddl-depend"/>).
|
2011-02-08 22:08:41 +01:00
|
|
|
|
</para>
|
|
|
|
|
</listitem>
|
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
|
<term><literal>RESTRICT</literal></term>
|
|
|
|
|
<listitem>
|
|
|
|
|
<para>
|
2022-08-12 15:06:48 +02:00
|
|
|
|
This option prevents the specified extensions from being dropped if
|
|
|
|
|
other objects, besides these extensions, their members, and their
|
|
|
|
|
explicitly dependent routines, depend on them. This is the default.
|
2011-02-08 22:08:41 +01:00
|
|
|
|
</para>
|
|
|
|
|
</listitem>
|
|
|
|
|
</varlistentry>
|
|
|
|
|
</variablelist>
|
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
|
<title>Examples</title>
|
|
|
|
|
|
|
|
|
|
<para>
|
|
|
|
|
To remove the extension <literal>hstore</literal> from the current
|
|
|
|
|
database:
|
|
|
|
|
<programlisting>
|
|
|
|
|
DROP EXTENSION hstore;
|
|
|
|
|
</programlisting>
|
|
|
|
|
This command will fail if any of <literal>hstore</literal>'s objects
|
|
|
|
|
are in use in the database, for example if any tables have columns
|
2017-10-09 03:44:17 +02:00
|
|
|
|
of the <type>hstore</type> type. Add the <literal>CASCADE</literal> option to
|
2011-02-08 22:08:41 +01:00
|
|
|
|
forcibly remove those dependent objects as well.
|
|
|
|
|
</para>
|
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
|
<title>Compatibility</title>
|
|
|
|
|
|
|
|
|
|
<para>
|
2017-10-09 03:44:17 +02:00
|
|
|
|
<command>DROP EXTENSION</command> is a <productname>PostgreSQL</productname>
|
2011-02-08 22:08:41 +01:00
|
|
|
|
extension.
|
|
|
|
|
</para>
|
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
|
<title>See Also</title>
|
|
|
|
|
|
|
|
|
|
<simplelist type="inline">
|
2017-11-23 15:39:47 +01:00
|
|
|
|
<member><xref linkend="sql-createextension"/></member>
|
|
|
|
|
<member><xref linkend="sql-alterextension"/></member>
|
2011-02-08 22:08:41 +01:00
|
|
|
|
</simplelist>
|
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
|
|
</refentry>
|