]> begriffs open source - ai-pg/blob - full-docs/man7/DROP_EXTENSION.7
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / man7 / DROP_EXTENSION.7
1 '\" t
2 .\"     Title: DROP EXTENSION
3 .\"    Author: The PostgreSQL Global Development Group
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\"      Date: 2025
6 .\"    Manual: PostgreSQL 18.0 Documentation
7 .\"    Source: PostgreSQL 18.0
8 .\"  Language: English
9 .\"
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 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 DROP_EXTENSION \- remove an extension
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 DROP EXTENSION [ IF EXISTS ] \fIname\fR [, \&.\&.\&.] [ CASCADE | RESTRICT ]
36 .fi
37 .SH "DESCRIPTION"
38 .PP
39 \fBDROP EXTENSION\fR
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\&.
44 .PP
45 You must own the extension to use
46 \fBDROP EXTENSION\fR\&.
47 .SH "PARAMETERS"
48 .PP
49 IF EXISTS
50 .RS 4
51 Do not throw an error if the extension does not exist\&. A notice is issued in this case\&.
52 .RE
53 .PP
54 \fIname\fR
55 .RS 4
56 The name of an installed extension\&.
57 .RE
58 .PP
59 CASCADE
60 .RS 4
61 Automatically drop objects that depend on the extension, and in turn all objects that depend on those objects (see
62 Section\ \&5.15)\&.
63 .RE
64 .PP
65 RESTRICT
66 .RS 4
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\&.
68 .RE
69 .SH "EXAMPLES"
70 .PP
71 To remove the extension
72 hstore
73 from the current database:
74 .sp
75 .if n \{\
76 .RS 4
77 .\}
78 .nf
79 DROP EXTENSION hstore;
80 .fi
81 .if n \{\
82 .RE
83 .\}
84 .sp
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
87 hstore
88 type\&. Add the
89 CASCADE
90 option to forcibly remove those dependent objects as well\&.
91 .SH "COMPATIBILITY"
92 .PP
93 \fBDROP EXTENSION\fR
94 is a
95 PostgreSQL
96 extension\&.
97 .SH "SEE ALSO"
98 CREATE EXTENSION (\fBCREATE_EXTENSION\fR(7)), ALTER EXTENSION (\fBALTER_EXTENSION\fR(7))