1DROP SCHEMA(7)          PostgreSQL 9.2.24 Documentation         DROP SCHEMA(7)
2
3
4

NAME

6       DROP_SCHEMA - remove a schema
7

SYNOPSIS

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

DESCRIPTION

12       DROP SCHEMA removes schemas from the database.
13
14       A schema can only be dropped by its owner or a superuser. Note that the
15       owner can drop the schema (and thereby all contained objects) even if
16       he does not own some of the objects within the schema.
17

PARAMETERS

19       IF EXISTS
20           Do not throw an error if the schema does not exist. A notice is
21           issued in this case.
22
23       name
24           The name of a schema.
25
26       CASCADE
27           Automatically drop objects (tables, functions, etc.) that are
28           contained in the schema.
29
30       RESTRICT
31           Refuse to drop the schema if it contains any objects. This is the
32           default.
33

EXAMPLES

35       To remove schema mystuff from the database, along with everything it
36       contains:
37
38           DROP SCHEMA mystuff CASCADE;
39

COMPATIBILITY

41       DROP SCHEMA is fully conforming with the SQL standard, except that the
42       standard only allows one schema to be dropped per command, and apart
43       from the IF EXISTS option, which is a PostgreSQL extension.
44

SEE ALSO

46       ALTER SCHEMA (ALTER_SCHEMA(7)), CREATE SCHEMA (CREATE_SCHEMA(7))
47
48
49
50PostgreSQL 9.2.24                 2017-11-06                    DROP SCHEMA(7)
Impressum