~vcs-imports/mammoth-replicator/trunk

« back to all changes in this revision

Viewing changes to doc/src/sgml/ref/drop_schema.sgml

  • Committer: alvherre
  • Date: 2005-12-16 21:24:52 UTC
  • Revision ID: svn-v4:db760fc0-0f08-0410-9d63-cc6633f64896:trunk:1
Initial import of the REL8_0_3 sources from the Pgsql CVS repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!--
 
2
$PostgreSQL: pgsql/doc/src/sgml/ref/drop_schema.sgml,v 1.6 2003-11-29 19:51:38 pgsql Exp $
 
3
PostgreSQL documentation
 
4
-->
 
5
 
 
6
<refentry id="SQL-DROPSCHEMA">
 
7
 <refmeta>
 
8
  <refentrytitle id="SQL-DROPSCHEMA-TITLE">DROP SCHEMA</refentrytitle>
 
9
  <refmiscinfo>SQL - Language Statements</refmiscinfo>
 
10
 </refmeta>
 
11
 
 
12
 <refnamediv>
 
13
  <refname>DROP SCHEMA</refname>
 
14
  <refpurpose>remove a schema</refpurpose>
 
15
 </refnamediv>
 
16
 
 
17
 <indexterm zone="sql-dropschema">
 
18
  <primary>DROP SCHEMA</primary>
 
19
 </indexterm>
 
20
 
 
21
 <refsynopsisdiv>
 
22
<synopsis>
 
23
DROP SCHEMA <replaceable class="PARAMETER">name</replaceable> [, ...] [ CASCADE | RESTRICT ]
 
24
</synopsis>
 
25
 </refsynopsisdiv>
 
26
 
 
27
 <refsect1>
 
28
  <title>Description</title>
 
29
 
 
30
  <para>
 
31
   <command>DROP SCHEMA</command> removes schemas from the database.
 
32
  </para>
 
33
 
 
34
  <para>
 
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.
 
38
  </para>
 
39
 </refsect1>
 
40
  
 
41
 <refsect1>
 
42
  <title>Parameters</title>
 
43
 
 
44
  <variablelist>
 
45
   <varlistentry>
 
46
    <term><replaceable class="PARAMETER">name</replaceable></term>
 
47
    <listitem>
 
48
     <para>
 
49
      The name of a schema.
 
50
     </para>
 
51
    </listitem>
 
52
   </varlistentry>
 
53
 
 
54
   <varlistentry>
 
55
    <term><literal>CASCADE</literal></term>
 
56
    <listitem>
 
57
     <para>
 
58
      Automatically drop objects (tables, functions, etc.) that are
 
59
      contained in the schema.
 
60
     </para>
 
61
    </listitem>
 
62
   </varlistentry>
 
63
 
 
64
   <varlistentry>
 
65
    <term><literal>RESTRICT</literal></term>
 
66
    <listitem>
 
67
     <para>
 
68
      Refuse to drop the schema if it contains any objects.  This is
 
69
      the default.
 
70
     </para>
 
71
    </listitem>
 
72
   </varlistentry>
 
73
  </variablelist>
 
74
 </refsect1>
 
75
 
 
76
 <refsect1>
 
77
  <title>Examples</title>
 
78
 
 
79
  <para>
 
80
   To remove schema <literal>mystuff</literal> from the database,
 
81
   along with everything it contains:
 
82
 
 
83
<programlisting>
 
84
DROP SCHEMA mystuff CASCADE;
 
85
</programlisting>
 
86
  </para>
 
87
 </refsect1>
 
88
 
 
89
 <refsect1>
 
90
  <title>Compatibility</title>
 
91
  
 
92
  <para>
 
93
   <command>DROP SCHEMA</command> is fully conforming with the SQL
 
94
   standard, except that the standard only allows one schema to be
 
95
   dropped per command.
 
96
  </para>
 
97
 </refsect1>
 
98
 
 
99
 <refsect1>
 
100
  <title>See Also</title>
 
101
 
 
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>
 
105
  </simplelist>
 
106
 </refsect1>
 
107
 
 
108
</refentry>
 
109
 
 
110
<!-- Keep this comment at the end of the file
 
111
Local variables:
 
112
mode: sgml
 
113
sgml-omittag:nil
 
114
sgml-shorttag:t
 
115
sgml-minimize-attributes:nil
 
116
sgml-always-quote-attributes:t
 
117
sgml-indent-step:1
 
118
sgml-indent-data: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
 
124
End:
 
125
-->