]> granicus.if.org Git - postgresql/blob - doc/src/sgml/ref/drop_view.sgml
a789e38c4ce1c2ce07ba3c5a6c61a3eb8da96cbf
[postgresql] / doc / src / sgml / ref / drop_view.sgml
1 <!--
2 $Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_view.sgml,v 1.14 2002/05/18 15:44:47 petere Exp $
3 PostgreSQL documentation
4 -->
5
6 <refentry id="SQL-DROPVIEW">
7  <refmeta>
8   <refentrytitle id="SQL-DROPVIEW-TITLE">DROP VIEW</refentrytitle>
9   <refmiscinfo>SQL - Language Statements</refmiscinfo>
10  </refmeta>
11  <refnamediv>
12   <refname>
13    DROP VIEW
14   </refname>
15   <refpurpose>
16    remove a view
17   </refpurpose>
18  </refnamediv>
19  <refsynopsisdiv>
20   <refsynopsisdivinfo>
21    <date>1999-07-20</date>
22   </refsynopsisdivinfo>
23   <synopsis>
24 DROP VIEW <replaceable class="PARAMETER">name</replaceable> [, ...]
25   </synopsis>
26   
27   <refsect2 id="R2-SQL-DROPVIEW-1">
28    <refsect2info>
29     <date>1998-09-22</date>
30    </refsect2info>
31    <title>
32     Inputs
33    </title>
34    <para>
35
36     <variablelist>
37      <varlistentry>
38       <term><replaceable class="PARAMETER">name</replaceable></term>
39       <listitem>
40        <para>
41         The name (optionally schema-qualified) of an existing view.
42        </para>
43       </listitem>
44      </varlistentry>
45     </variablelist>
46    </para>
47   </refsect2>
48
49   <refsect2 id="R2-SQL-DROPVIEW-2">
50    <refsect2info>
51     <date>1998-09-22</date>
52    </refsect2info>
53    <title>
54     Outputs
55    </title>
56    <para>
57
58     <variablelist>
59      <varlistentry>
60       <term><computeroutput>
61 DROP VIEW
62        </computeroutput></term>
63       <listitem>
64        <para>
65         The message returned if the command is successful.
66        </para>
67       </listitem>
68      </varlistentry>
69      <varlistentry>
70       <term><computeroutput>
71 ERROR: view <replaceable class="parameter">name</replaceable> does not exist
72        </computeroutput></term>
73       <listitem>
74        <para>
75         This message occurs if the specified view does not exist in
76         the database.
77        </para>
78       </listitem>
79      </varlistentry>
80     </variablelist>
81    </para>
82   </refsect2>
83  </refsynopsisdiv>
84
85  <refsect1 id="R1-SQL-DROPVIEW-1">
86   <refsect1info>
87    <date>1998-09-22</date>
88   </refsect1info>
89   <title>
90    Description
91   </title>
92   <para>
93    <command>DROP VIEW</command> drops an existing view from the database.
94    To execute this command you must be the owner of the
95    view.
96   </para>
97
98   <refsect2 id="R2-SQL-DROPVIEW-3">
99    <refsect2info>
100     <date>1998-09-22</date>
101    </refsect2info>
102    <title>
103     Notes
104    </title>
105    <para>
106     Refer to <xref linkend="sql-createview">
107     for information on how to create views.
108    </para>
109   </refsect2>
110  </refsect1>
111
112  <refsect1 id="R1-SQL-DROPVIEW-2">
113   <title>
114    Usage
115   </title>
116   <para>
117    This command will remove the view called <literal>kinds</literal>:
118   </para>
119   <programlisting>
120 DROP VIEW kinds;
121   </programlisting>
122  </refsect1>
123  
124  <refsect1 id="R1-SQL-DROPVIEW-3">
125   <title>
126    Compatibility
127   </title>
128   
129   <refsect2 id="R2-SQL-DROPVIEW-4">
130    <refsect2info>
131     <date>1998-09-22</date>
132    </refsect2info>
133    <title>
134     SQL92
135    </title>
136    <para>
137     <acronym>SQL92</acronym> specifies some additional capabilities for
138     <command>DROP VIEW</command>:
139    
140     <synopsis>
141 DROP VIEW <replaceable class="parameter">view</replaceable> { RESTRICT | CASCADE }
142     </synopsis>
143    </para>
144
145    <refsect3 id="R3-SQL-DROPVIEW-1">
146     <refsect3info>
147      <date>1998-09-22</date>
148     </refsect3info>
149     <title>
150      Inputs
151     </title>
152     <para>
153      <variablelist>
154       <varlistentry>
155        <term>RESTRICT</term>
156        <listitem>
157         <para>
158          Ensures that only a view with no dependent views or
159          integrity constraints can be destroyed.
160         </para>
161        </listitem>
162       </varlistentry>
163       <varlistentry>
164        <term>CASCADE</term>
165        <listitem>
166         <para>
167          Any referencing views and integrity constraints
168          will be dropped as well.
169         </para>
170        </listitem>
171       </varlistentry>
172      </variablelist>
173     </para>
174    </refsect3>
175
176   <refsect3 id="R3-SQL-DROPVIEW-2">
177    <refsect3info>
178     <date>1998-09-22</date>
179    </refsect3info>
180    <title>
181     Notes
182     </title>
183     <para>
184      At present, to remove a referencing view from a
185      <productname>PostgreSQL</productname> database, 
186      you must drop it explicitly.
187     </para>
188    </refsect3>
189   </refsect2>
190  </refsect1>
191 </refentry>
192
193 <!-- Keep this comment at the end of the file
194 Local variables:
195 mode: sgml
196 sgml-omittag:nil
197 sgml-shorttag:t
198 sgml-minimize-attributes:nil
199 sgml-always-quote-attributes:t
200 sgml-indent-step:1
201 sgml-indent-data:t
202 sgml-parent-document:nil
203 sgml-default-dtd-file:"../reference.ced"
204 sgml-exposed-tags:nil
205 sgml-local-catalogs:"/usr/lib/sgml/catalog"
206 sgml-local-ecat-files:nil
207 End:
208 -->