2
$PostgreSQL: pgsql/doc/src/sgml/ref/drop_schema.sgml,v 1.6 2003-11-29 19:51:38 pgsql Exp $
3
PostgreSQL documentation
6
<refentry id="SQL-DROPSCHEMA">
8
<refentrytitle id="SQL-DROPSCHEMA-TITLE">DROP SCHEMA</refentrytitle>
9
<refmiscinfo>SQL - Language Statements</refmiscinfo>
13
<refname>DROP SCHEMA</refname>
14
<refpurpose>remove a schema</refpurpose>
17
<indexterm zone="sql-dropschema">
18
<primary>DROP SCHEMA</primary>
23
DROP SCHEMA <replaceable class="PARAMETER">name</replaceable> [, ...] [ CASCADE | RESTRICT ]
28
<title>Description</title>
31
<command>DROP SCHEMA</command> removes schemas from the database.
35
A schema can only be dropped by its owner or a superuser. Note that
36
the owner can drop the schema (and thereby all contained objects)
37
even if he does not own some of the objects within the schema.
42
<title>Parameters</title>
46
<term><replaceable class="PARAMETER">name</replaceable></term>
55
<term><literal>CASCADE</literal></term>
58
Automatically drop objects (tables, functions, etc.) that are
59
contained in the schema.
65
<term><literal>RESTRICT</literal></term>
68
Refuse to drop the schema if it contains any objects. This is
77
<title>Examples</title>
80
To remove schema <literal>mystuff</literal> from the database,
81
along with everything it contains:
84
DROP SCHEMA mystuff CASCADE;
90
<title>Compatibility</title>
93
<command>DROP SCHEMA</command> is fully conforming with the SQL
94
standard, except that the standard only allows one schema to be
100
<title>See Also</title>
102
<simplelist type="inline">
103
<member><xref linkend="sql-alterschema" endterm="sql-alterschema-title"></member>
104
<member><xref linkend="sql-createschema" endterm="sql-createschema-title"></member>
110
<!-- Keep this comment at the end of the file
115
sgml-minimize-attributes:nil
116
sgml-always-quote-attributes:t
119
sgml-parent-document:nil
120
sgml-default-dtd-file:"../reference.ced"
121
sgml-exposed-tags:nil
122
sgml-local-catalogs:"/usr/lib/sgml/catalog"
123
sgml-local-ecat-files:nil