postgresql/doc/src/sgml/ref/drop_view.sgml

177 lines
3.7 KiB
Plaintext
Raw Normal View History

<!--
2002-11-22 00:34:43 +01:00
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_view.sgml,v 1.16 2002/11/21 23:34:43 petere Exp $
PostgreSQL documentation
-->
<refentry id="SQL-DROPVIEW">
<refmeta>
<refentrytitle id="SQL-DROPVIEW-TITLE">DROP VIEW</refentrytitle>
<refmiscinfo>SQL - Language Statements</refmiscinfo>
</refmeta>
<refnamediv>
<refname>
DROP VIEW
</refname>
<refpurpose>
remove a view
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<refsynopsisdivinfo>
<date>1999-07-20</date>
</refsynopsisdivinfo>
<synopsis>
DROP VIEW <replaceable class="PARAMETER">name</replaceable> [, ...] [ CASCADE | RESTRICT ]
</synopsis>
<refsect2 id="R2-SQL-DROPVIEW-1">
<refsect2info>
<date>1998-09-22</date>
</refsect2info>
<title>
Inputs
</title>
<para>
<variablelist>
<varlistentry>
<term><replaceable class="PARAMETER">name</replaceable></term>
<listitem>
<para>
The name (optionally schema-qualified) of an existing view.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>CASCADE</term>
<listitem>
<para>
Automatically drop objects that depend on the view
(such as other views).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>RESTRICT</term>
<listitem>
<para>
Refuse to drop the view if there are any dependent objects.
This is the default.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect2>
<refsect2 id="R2-SQL-DROPVIEW-2">
<refsect2info>
<date>1998-09-22</date>
</refsect2info>
<title>
Outputs
</title>
<para>
<variablelist>
<varlistentry>
<term><computeroutput>
DROP VIEW
</computeroutput></term>
<listitem>
<para>
The message returned if the command is successful.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>
ERROR: view <replaceable class="parameter">name</replaceable> does not exist
</computeroutput></term>
<listitem>
<para>
This message occurs if the specified view does not exist in
the database.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect2>
</refsynopsisdiv>
<refsect1 id="R1-SQL-DROPVIEW-1">
<refsect1info>
<date>1998-09-22</date>
</refsect1info>
<title>
Description
</title>
<para>
<command>DROP VIEW</command> drops an existing view from the database.
To execute this command you must be the owner of the
view.
</para>
<refsect2 id="R2-SQL-DROPVIEW-3">
<refsect2info>
<date>1998-09-22</date>
</refsect2info>
<title>
Notes
</title>
<para>
2002-11-22 00:34:43 +01:00
Refer to <xref linkend="sql-createview" endterm="sql-createview-title">
for information on how to create views.
</para>
</refsect2>
</refsect1>
<refsect1 id="R1-SQL-DROPVIEW-2">
<title>
Usage
</title>
<para>
This command will remove the view called <literal>kinds</literal>:
</para>
<programlisting>
1998-09-22 17:48:03 +02:00
DROP VIEW kinds;
</programlisting>
</refsect1>
<refsect1 id="R1-SQL-DROPVIEW-3">
<title>
Compatibility
</title>
<refsect2 id="R2-SQL-DROPVIEW-4">
<refsect2info>
<date>1998-09-22</date>
</refsect2info>
<title>
SQL92
</title>
<para>
</para>
</refsect2>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:nil
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../reference.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:"/usr/lib/sgml/catalog"
sgml-local-ecat-files:nil
End:
-->