]> granicus.if.org Git - postgresql/blob - doc/src/sgml/ref/drop_sequence.sgml
f519ebedee7f76d271de74617946137a697c27d2
[postgresql] / doc / src / sgml / ref / drop_sequence.sgml
1 <!--
2 $PostgreSQL: pgsql/doc/src/sgml/ref/drop_sequence.sgml,v 1.21 2004/11/27 21:27:07 petere Exp $
3 PostgreSQL documentation
4 -->
5
6 <refentry id="SQL-DROPSEQUENCE">
7  <refmeta>
8   <refentrytitle id="SQL-DROPSEQUENCE-TITLE">DROP SEQUENCE</refentrytitle>
9   <refmiscinfo>SQL - Language Statements</refmiscinfo>
10  </refmeta>
11
12  <refnamediv>
13   <refname>DROP SEQUENCE</refname>
14   <refpurpose>remove a sequence</refpurpose>
15  </refnamediv>
16
17  <indexterm zone="sql-dropsequence">
18   <primary>DROP SEQUENCE</primary>
19  </indexterm>
20
21  <refsynopsisdiv>
22 <synopsis>
23 DROP SEQUENCE <replaceable class="PARAMETER">name</replaceable> [, ...] [ CASCADE | RESTRICT ]
24 </synopsis>
25  </refsynopsisdiv>
26
27  <refsect1>
28   <title>Description</title>
29
30   <para>
31    <command>DROP SEQUENCE</command> removes sequence number generators.
32   </para>
33  </refsect1>
34   
35  <refsect1>
36   <title>Parameters</title>
37
38   <variablelist>
39    <varlistentry>
40     <term><replaceable class="PARAMETER">name</replaceable></term>
41     <listitem>
42      <para>
43       The name (optionally schema-qualified) of a sequence.
44      </para>
45     </listitem>
46    </varlistentry>
47
48    <varlistentry>
49     <term><literal>CASCADE</literal></term>
50     <listitem>
51      <para>
52       Automatically drop objects that depend on the sequence.
53      </para>
54     </listitem>
55    </varlistentry>
56
57    <varlistentry>
58     <term><literal>RESTRICT</literal></term>
59     <listitem>
60      <para>
61       Refuse to drop the sequence if any objects depend on it.  This
62       is the default.
63      </para>
64     </listitem>
65    </varlistentry>
66   </variablelist>
67  </refsect1>
68
69  <refsect1>
70   <title>Examples</title>
71
72   <para>
73    To remove the sequence <literal>serial</literal>:
74
75 <programlisting>
76 DROP SEQUENCE serial;
77 </programlisting>
78   </para>
79  </refsect1>
80  
81  <refsect1>
82   <title>Compatibility</title>
83
84   <para>
85     <command>DROP SEQUENCE</command> conforms with <acronym>SQL:2003</acronym>.
86   </para>
87  </refsect1>
88
89  <refsect1>
90   <title>See Also</title>
91
92   <simplelist type="inline">
93    <member><xref linkend="sql-createsequence" endterm="sql-createsequence-title"></member>
94   </simplelist>
95  </refsect1>
96
97 </refentry>
98
99 <!-- Keep this comment at the end of the file
100 Local variables:
101 mode: sgml
102 sgml-omittag:nil
103 sgml-shorttag:t
104 sgml-minimize-attributes:nil
105 sgml-always-quote-attributes:t
106 sgml-indent-step:1
107 sgml-indent-data:t
108 sgml-parent-document:nil
109 sgml-default-dtd-file:"../reference.ced"
110 sgml-exposed-tags:nil
111 sgml-local-catalogs:"/usr/lib/sgml/catalog"
112 sgml-local-ecat-files:nil
113 End:
114 -->