2 .\" Title: DROP EXTENSION
3 .\" Author: The PostgreSQL Global Development Group
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
6 .\" Manual: PostgreSQL 18.0 Documentation
7 .\" Source: PostgreSQL 18.0
10 .TH "DROP EXTENSION" "7" "2025" "PostgreSQL 18.0" "PostgreSQL 18.0 Documentation"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 DROP_EXTENSION \- remove an extension
35 DROP EXTENSION [ IF EXISTS ] \fIname\fR [, \&.\&.\&.] [ CASCADE | RESTRICT ]
40 removes extensions from the database\&. Dropping an extension causes its member objects, and other explicitly dependent routines (see
41 ALTER ROUTINE (\fBALTER_ROUTINE\fR(7)), the
42 DEPENDS ON EXTENSION \fIextension_name\fR
43 action), to be dropped as well\&.
45 You must own the extension to use
46 \fBDROP EXTENSION\fR\&.
51 Do not throw an error if the extension does not exist\&. A notice is issued in this case\&.
56 The name of an installed extension\&.
61 Automatically drop objects that depend on the extension, and in turn all objects that depend on those objects (see
67 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\&.
71 To remove the extension
73 from the current database:
79 DROP EXTENSION hstore;
85 This command will fail if any of
86 hstore\*(Aqs objects are in use in the database, for example if any tables have columns of the
90 option to forcibly remove those dependent objects as well\&.
98 CREATE EXTENSION (\fBCREATE_EXTENSION\fR(7)), ALTER EXTENSION (\fBALTER_EXTENSION\fR(7))