]> begriffs open source - ai-pg/blob - full-docs/txt/sql-dropextension.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / sql-dropextension.txt
1
2 DROP EXTENSION
3
4    DROP EXTENSION — remove an extension
5
6 Synopsis
7
8 DROP EXTENSION [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
9
10 Description
11
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, the DEPENDS ON EXTENSION extension_name
15    action), to be dropped as well.
16
17    You must own the extension to use DROP EXTENSION.
18
19 Parameters
20
21    IF EXISTS
22           Do not throw an error if the extension does not exist. A notice
23           is issued in this case.
24
25    name
26           The name of an installed extension.
27
28    CASCADE
29           Automatically drop objects that depend on the extension, and in
30           turn all objects that depend on those objects (see
31           Section 5.15).
32
33    RESTRICT
34           This option prevents the specified extensions from being dropped
35           if other objects, besides these extensions, their members, and
36           their explicitly dependent routines, depend on them. This is the
37           default.
38
39 Examples
40
41    To remove the extension hstore from the current database:
42 DROP EXTENSION hstore;
43
44    This command will fail if any of hstore's objects are in use in the
45    database, for example if any tables have columns of the hstore type.
46    Add the CASCADE option to forcibly remove those dependent objects as
47    well.
48
49 Compatibility
50
51    DROP EXTENSION is a PostgreSQL extension.
52
53 See Also
54
55    CREATE EXTENSION, ALTER EXTENSION