~ubuntu-branches/ubuntu/oneiric/postgresql-9.1/oneiric-security

« back to all changes in this revision

Viewing changes to doc/src/sgml/ref/drop_sequence.sgml

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-05-11 10:41:53 UTC
  • Revision ID: james.westby@ubuntu.com-20110511104153-psbh2o58553fv1m0
Tags: upstream-9.1~beta1
ImportĀ upstreamĀ versionĀ 9.1~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!--
 
2
doc/src/sgml/ref/drop_sequence.sgml
 
3
PostgreSQL documentation
 
4
-->
 
5
 
 
6
<refentry id="SQL-DROPSEQUENCE">
 
7
 <refmeta>
 
8
  <refentrytitle>DROP SEQUENCE</refentrytitle>
 
9
  <manvolnum>7</manvolnum>
 
10
  <refmiscinfo>SQL - Language Statements</refmiscinfo>
 
11
 </refmeta>
 
12
 
 
13
 <refnamediv>
 
14
  <refname>DROP SEQUENCE</refname>
 
15
  <refpurpose>remove a sequence</refpurpose>
 
16
 </refnamediv>
 
17
 
 
18
 <indexterm zone="sql-dropsequence">
 
19
  <primary>DROP SEQUENCE</primary>
 
20
 </indexterm>
 
21
 
 
22
 <refsynopsisdiv>
 
23
<synopsis>
 
24
DROP SEQUENCE [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> [, ...] [ CASCADE | RESTRICT ]
 
25
</synopsis>
 
26
 </refsynopsisdiv>
 
27
 
 
28
 <refsect1>
 
29
  <title>Description</title>
 
30
 
 
31
  <para>
 
32
   <command>DROP SEQUENCE</command> removes sequence number
 
33
   generators. A sequence can only be dropped by its owner or a superuser.
 
34
  </para>
 
35
 </refsect1>
 
36
 
 
37
 <refsect1>
 
38
  <title>Parameters</title>
 
39
 
 
40
  <variablelist>
 
41
   <varlistentry>
 
42
    <term><literal>IF EXISTS</literal></term>
 
43
    <listitem>
 
44
     <para>
 
45
      Do not throw an error if the sequence does not exist. A notice is issued
 
46
      in this case.
 
47
     </para>
 
48
    </listitem>
 
49
   </varlistentry>
 
50
 
 
51
   <varlistentry>
 
52
    <term><replaceable class="PARAMETER">name</replaceable></term>
 
53
    <listitem>
 
54
     <para>
 
55
      The name (optionally schema-qualified) of a sequence.
 
56
     </para>
 
57
    </listitem>
 
58
   </varlistentry>
 
59
 
 
60
   <varlistentry>
 
61
    <term><literal>CASCADE</literal></term>
 
62
    <listitem>
 
63
     <para>
 
64
      Automatically drop objects that depend on the sequence.
 
65
     </para>
 
66
    </listitem>
 
67
   </varlistentry>
 
68
 
 
69
   <varlistentry>
 
70
    <term><literal>RESTRICT</literal></term>
 
71
    <listitem>
 
72
     <para>
 
73
      Refuse to drop the sequence if any objects depend on it.  This
 
74
      is the default.
 
75
     </para>
 
76
    </listitem>
 
77
   </varlistentry>
 
78
  </variablelist>
 
79
 </refsect1>
 
80
 
 
81
 <refsect1>
 
82
  <title>Examples</title>
 
83
 
 
84
  <para>
 
85
   To remove the sequence <literal>serial</literal>:
 
86
 
 
87
<programlisting>
 
88
DROP SEQUENCE serial;
 
89
</programlisting>
 
90
  </para>
 
91
 </refsect1>
 
92
 
 
93
 <refsect1>
 
94
  <title>Compatibility</title>
 
95
 
 
96
  <para>
 
97
   <command>DROP SEQUENCE</command> conforms to the <acronym>SQL</acronym>
 
98
   standard, except that the standard only allows one
 
99
   sequence to be dropped per command, and apart from the
 
100
   <literal>IF EXISTS</> option, which is a <productname>PostgreSQL</>
 
101
   extension.
 
102
  </para>
 
103
 </refsect1>
 
104
 
 
105
 <refsect1>
 
106
  <title>See Also</title>
 
107
 
 
108
  <simplelist type="inline">
 
109
   <member><xref linkend="sql-createsequence"></member>
 
110
   <member><xref linkend="sql-altersequence"></member>
 
111
  </simplelist>
 
112
 </refsect1>
 
113
 
 
114
</refentry>