2 doc/src/sgml/ref/drop_view.sgml
3 PostgreSQL documentation
6 <refentry id="SQL-DROPVIEW">
7 <indexterm zone="sql-dropview">
8 <primary>DROP VIEW</primary>
12 <refentrytitle>DROP VIEW</refentrytitle>
13 <manvolnum>7</manvolnum>
14 <refmiscinfo>SQL - Language Statements</refmiscinfo>
18 <refname>DROP VIEW</refname>
19 <refpurpose>remove a view</refpurpose>
24 DROP VIEW [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> [, ...] [ CASCADE | RESTRICT ]
29 <title>Description</title>
32 <command>DROP VIEW</command> drops an existing view. To execute
33 this command you must be the owner of the view.
38 <title>Parameters</title>
42 <term><literal>IF EXISTS</literal></term>
45 Do not throw an error if the view does not exist. A notice is issued
52 <term><replaceable class="PARAMETER">name</replaceable></term>
55 The name (optionally schema-qualified) of the view to remove.
61 <term><literal>CASCADE</literal></term>
64 Automatically drop objects that depend on the view (such as
66 and in turn all objects that depend on those objects
67 (see <xref linkend="ddl-depend">).
73 <term><literal>RESTRICT</literal></term>
76 Refuse to drop the view if any objects depend on it. This is
85 <title>Examples</title>
88 This command will remove the view called <literal>kinds</literal>:
91 </programlisting></para>
95 <title>Compatibility</title>
98 This command conforms to the SQL standard, except that the standard only
99 allows one view to be dropped per command, and apart from the
100 <literal>IF EXISTS</> option, which is a <productname>PostgreSQL</>
106 <title>See Also</title>
108 <simplelist type="inline">
109 <member><xref linkend="sql-alterview"></member>
110 <member><xref linkend="sql-createview"></member>