postgresql/doc/src/sgml/ref/drop_sequence.sgml

135 lines
2.9 KiB
Plaintext
Raw Normal View History

<!--
2003-05-04 04:23:16 +02:00
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_sequence.sgml,v 1.17 2003/05/04 02:23:16 petere Exp $
PostgreSQL documentation
-->
<refentry id="SQL-DROPSEQUENCE">
<refmeta>
<refentrytitle id="SQL-DROPSEQUENCE-TITLE">DROP SEQUENCE</refentrytitle>
<refmiscinfo>SQL - Language Statements</refmiscinfo>
</refmeta>
2003-05-04 04:23:16 +02:00
<refnamediv>
2003-05-04 04:23:16 +02:00
<refname>DROP SEQUENCE</refname>
<refpurpose>remove a sequence</refpurpose>
</refnamediv>
2003-05-04 04:23:16 +02:00
<refsynopsisdiv>
2003-05-04 04:23:16 +02:00
<synopsis>
DROP SEQUENCE <replaceable class="PARAMETER">name</replaceable> [, ...] [ CASCADE | RESTRICT ]
2003-05-04 04:23:16 +02:00
</synopsis>
</refsynopsisdiv>
2003-05-04 04:23:16 +02:00
<refsect1>
<title>Description</title>
<para>
2003-05-04 04:23:16 +02:00
<command>DROP SEQUENCE</command> removes sequence number generators.
</para>
2003-05-04 04:23:16 +02:00
</refsect1>
<refsect1>
<title>Parameters</title>
<variablelist>
<varlistentry>
<term><replaceable class="PARAMETER">name</replaceable></term>
<listitem>
<para>
The name (optionally schema-qualified) of a sequence.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>CASCADE</literal></term>
<listitem>
<para>
Automatically drop objects that depend on the sequence.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>RESTRICT</literal></term>
<listitem>
<para>
Refuse to drop the sequence if any objects depend on it. This
is the default.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
2003-05-04 04:23:16 +02:00
<refsect1>
<title>Diagnostics</title>
<variablelist>
<varlistentry>
<term><computeroutput>DROP SEQUENCE</computeroutput></term>
<listitem>
<para>
Message returned if the sequence was successfully dropped.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>ERROR: sequence "<replaceable class="parameter">name</replaceable>" does not exist</computeroutput></term>
<listitem>
<para>
Message returned if the specified sequence does not exist.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
2003-05-04 04:23:16 +02:00
<refsect1>
<title>Examples</title>
<para>
2003-05-04 04:23:16 +02:00
To remove the sequence <literal>serial</literal>:
2003-05-04 04:23:16 +02:00
<programlisting>
DROP SEQUENCE serial;
2003-05-04 04:23:16 +02:00
</programlisting>
</para>
</refsect1>
2003-05-04 04:23:16 +02:00
<refsect1>
<title>Compatibility</title>
<para>
There is no <command>DROP SEQUENCE</command> statement in the SQL standard.
</para>
</refsect1>
2003-05-04 04:23:16 +02:00
<refsect1>
<title>See Also</title>
<simplelist type="inline">
<member><xref linkend="sql-createsequence" endterm="sql-createsequence-title"></member>
</simplelist>
</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:
-->