1DROP SCHEMA()                    SQL Commands                    DROP SCHEMA()
2
3
4

NAME

6       DROP SCHEMA - remove a schema
7
8

SYNOPSIS

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

DESCRIPTION

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

PARAMETERS

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

EXAMPLES

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

COMPATIBILITY

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

SEE ALSO

48       ALTER SCHEMA [alter_schema(7)], CREATE SCHEMA [create_schema(l)]
49
50
51
52SQL - Language Statements         2008-06-08                     DROP SCHEMA()
Impressum