1DROP EXTENSION(7)        PostgreSQL 15.4 Documentation       DROP EXTENSION(7)
2
3
4

NAME

6       DROP_EXTENSION - remove an extension
7

SYNOPSIS

9       DROP EXTENSION [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
10

DESCRIPTION

12       DROP EXTENSION removes extensions from the database. Dropping an
13       extension causes its member objects, and other explicitly dependent
14       routines (see ALTER ROUTINE (ALTER_ROUTINE(7)), the DEPENDS ON
15       EXTENSION extension_name action), to be dropped as well.
16
17       You must own the extension to use DROP EXTENSION.
18

PARAMETERS

20       IF EXISTS
21           Do not throw an error if the extension does not exist. A notice is
22           issued in this case.
23
24       name
25           The name of an installed extension.
26
27       CASCADE
28           Automatically drop objects that depend on the extension, and in
29           turn all objects that depend on those objects (see Section 5.14).
30
31       RESTRICT
32           This option prevents the specified extensions from being dropped if
33           other objects, besides these extensions, their members, and their
34           explicitly dependent routines, depend on them.  This is the
35           default.
36

EXAMPLES

38       To remove the extension hstore from the current database:
39
40           DROP EXTENSION hstore;
41
42       This command will fail if any of hstore's objects are in use in the
43       database, for example if any tables have columns of the hstore type.
44       Add the CASCADE option to forcibly remove those dependent objects as
45       well.
46

COMPATIBILITY

48       DROP EXTENSION is a PostgreSQL extension.
49

SEE ALSO

51       CREATE EXTENSION (CREATE_EXTENSION(7)), ALTER EXTENSION
52       (ALTER_EXTENSION(7))
53
54
55
56PostgreSQL 15.4                      2023                    DROP EXTENSION(7)
Impressum