3
.\" Author: The PostgreSQL Global Development Group
4
.\" Generator: DocBook XSL Stylesheets v1.75.1 <http://docbook.sf.net/>
6
.\" Manual: PostgreSQL 9.1beta1 Documentation
7
.\" Source: PostgreSQL 9.1beta1
10
.TH "DROP SCHEMA" "7" "2011-04-27" "PostgreSQL 9.1beta1" "PostgreSQL 9.1beta1 Documentation"
11
.\" -----------------------------------------------------------------
12
.\" * set default formatting
13
.\" -----------------------------------------------------------------
14
.\" disable hyphenation
16
.\" disable justification (adjust text to left margin only)
18
.\" -----------------------------------------------------------------
19
.\" * MAIN CONTENT STARTS HERE *
20
.\" -----------------------------------------------------------------
22
DROP_SCHEMA \- remove a schema
27
DROP SCHEMA [ IF EXISTS ] \fIname\fR [, \&.\&.\&.] [ CASCADE | RESTRICT ]
32
removes schemas from the database\&.
34
A schema can only be dropped by its owner or a superuser\&. Note that the owner can drop the schema (and thereby all contained objects) even if he does not own some of the objects within the schema\&.
39
Do not throw an error if the schema does not exist\&. A notice is issued in this case\&.
44
The name of a schema\&.
49
Automatically drop objects (tables, functions, etc\&.) that are contained in the schema\&.
54
Refuse to drop the schema if it contains any objects\&. This is the default\&.
60
from the database, along with everything it contains:
66
DROP SCHEMA mystuff CASCADE;
74
is fully conforming with the SQL standard, except that the standard only allows one schema to be dropped per command, and apart from the
80
ALTER SCHEMA (\fBALTER_SCHEMA\fR(7)), CREATE SCHEMA (\fBCREATE_SCHEMA\fR(7))