~ubuntu-branches/ubuntu/oneiric/postgresql-9.1/oneiric-security

« back to all changes in this revision

Viewing changes to doc/src/sgml/man7/DROP_SCHEMA.7

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-05-11 10:41:53 UTC
  • Revision ID: james.westby@ubuntu.com-20110511104153-psbh2o58553fv1m0
Tags: upstream-9.1~beta1
ImportĀ upstreamĀ versionĀ 9.1~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
'\" t
 
2
.\"     Title: DROP SCHEMA
 
3
.\"    Author: The PostgreSQL Global Development Group
 
4
.\" Generator: DocBook XSL Stylesheets v1.75.1 <http://docbook.sf.net/>
 
5
.\"      Date: 2011-04-27
 
6
.\"    Manual: PostgreSQL 9.1beta1 Documentation
 
7
.\"    Source: PostgreSQL 9.1beta1
 
8
.\"  Language: English
 
9
.\"
 
10
.TH "DROP SCHEMA" "7" "2011-04-27" "PostgreSQL 9.1beta1" "PostgreSQL 9.1beta1 Documentation"
 
11
.\" -----------------------------------------------------------------
 
12
.\" * set default formatting
 
13
.\" -----------------------------------------------------------------
 
14
.\" disable hyphenation
 
15
.nh
 
16
.\" disable justification (adjust text to left margin only)
 
17
.ad l
 
18
.\" -----------------------------------------------------------------
 
19
.\" * MAIN CONTENT STARTS HERE *
 
20
.\" -----------------------------------------------------------------
 
21
.SH "NAME"
 
22
DROP_SCHEMA \- remove a schema
 
23
.\" DROP SCHEMA
 
24
.SH "SYNOPSIS"
 
25
.sp
 
26
.nf
 
27
DROP SCHEMA [ IF EXISTS ] \fIname\fR [, \&.\&.\&.] [ CASCADE | RESTRICT ]
 
28
.fi
 
29
.SH "DESCRIPTION"
 
30
.PP
 
31
DROP SCHEMA
 
32
removes schemas from the database\&.
 
33
.PP
 
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\&.
 
35
.SH "PARAMETERS"
 
36
.PP
 
37
IF EXISTS
 
38
.RS 4
 
39
Do not throw an error if the schema does not exist\&. A notice is issued in this case\&.
 
40
.RE
 
41
.PP
 
42
\fIname\fR
 
43
.RS 4
 
44
The name of a schema\&.
 
45
.RE
 
46
.PP
 
47
CASCADE
 
48
.RS 4
 
49
Automatically drop objects (tables, functions, etc\&.) that are contained in the schema\&.
 
50
.RE
 
51
.PP
 
52
RESTRICT
 
53
.RS 4
 
54
Refuse to drop the schema if it contains any objects\&. This is the default\&.
 
55
.RE
 
56
.SH "EXAMPLES"
 
57
.PP
 
58
To remove schema
 
59
mystuff
 
60
from the database, along with everything it contains:
 
61
.sp
 
62
.if n \{\
 
63
.RS 4
 
64
.\}
 
65
.nf
 
66
DROP SCHEMA mystuff CASCADE;
 
67
.fi
 
68
.if n \{\
 
69
.RE
 
70
.\}
 
71
.SH "COMPATIBILITY"
 
72
.PP
 
73
DROP SCHEMA
 
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
 
75
IF EXISTS
 
76
option, which is a
 
77
PostgreSQL
 
78
extension\&.
 
79
.SH "SEE ALSO"
 
80
ALTER SCHEMA (\fBALTER_SCHEMA\fR(7)), CREATE SCHEMA (\fBCREATE_SCHEMA\fR(7))