OSDN Git Service

074f4e7216d0600b662042e517833083ba8c2b94
[pg-rex/syncrep.git] / doc / src / sgml / ref / drop_sequence.sgml
1 <!--
2 $PostgreSQL: pgsql/doc/src/sgml/ref/drop_sequence.sgml,v 1.24 2005/11/19 17:39:44 adunstan 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 [ IF EXISTS ] <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><literal>IF EXISTS</literal></term>
41     <listitem>
42      <para>
43       Do not throw an error if the sequence does not exist. A notice is issued 
44       in this case.
45      </para>
46     </listitem>
47    </varlistentry>
48
49    <varlistentry>
50     <term><replaceable class="PARAMETER">name</replaceable></term>
51     <listitem>
52      <para>
53       The name (optionally schema-qualified) of a sequence.
54      </para>
55     </listitem>
56    </varlistentry>
57
58    <varlistentry>
59     <term><literal>CASCADE</literal></term>
60     <listitem>
61      <para>
62       Automatically drop objects that depend on the sequence.
63      </para>
64     </listitem>
65    </varlistentry>
66
67    <varlistentry>
68     <term><literal>RESTRICT</literal></term>
69     <listitem>
70      <para>
71       Refuse to drop the sequence if any objects depend on it.  This
72       is the default.
73      </para>
74     </listitem>
75    </varlistentry>
76   </variablelist>
77  </refsect1>
78
79  <refsect1>
80   <title>Examples</title>
81
82   <para>
83    To remove the sequence <literal>serial</literal>:
84
85 <programlisting>
86 DROP SEQUENCE serial;
87 </programlisting>
88   </para>
89  </refsect1>
90  
91  <refsect1>
92   <title>Compatibility</title>
93
94   <para>
95    <command>DROP SEQUENCE</command> conforms to the <acronym>SQL</acronym>
96    standard, except that the standard only allows one
97    sequence to be dropped per command, and apart from the 
98    <literal>IF EXISTS</> option, which is a <productname>PostgreSQL</> 
99    extension. 
100   </para>
101  </refsect1>
102
103  <refsect1>
104   <title>See Also</title>
105
106   <simplelist type="inline">
107    <member><xref linkend="sql-createsequence" endterm="sql-createsequence-title"></member>
108   </simplelist>
109  </refsect1>
110
111 </refentry>
112
113 <!-- Keep this comment at the end of the file
114 Local variables:
115 mode: sgml
116 sgml-omittag:nil
117 sgml-shorttag:t
118 sgml-minimize-attributes:nil
119 sgml-always-quote-attributes:t
120 sgml-indent-step:1
121 sgml-indent-data:t
122 sgml-parent-document:nil
123 sgml-default-dtd-file:"../reference.ced"
124 sgml-exposed-tags:nil
125 sgml-local-catalogs:"/usr/lib/sgml/catalog"
126 sgml-local-ecat-files:nil
127 End:
128 -->