1
1
<!--
2
- $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_sequence.sgml,v 1.28 2002/05/18 15:44:47 petere Exp $
2
+ $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_sequence.sgml,v 1.29 2002/11/10 00:10:20 momjian Exp $
3
3
PostgreSQL documentation
4
4
-->
5
5
@@ -21,9 +21,9 @@ PostgreSQL documentation
21
21
<date>1999-07-20</date>
22
22
</refsynopsisdivinfo>
23
23
<synopsis>
24
- CREATE [ TEMPORARY | TEMP ] SEQUENCE <replaceable class="parameter">seqname</replaceable> [ INCREMENT <replaceable class="parameter">increment</replaceable> ]
24
+ CREATE [ TEMPORARY | TEMP ] SEQUENCE <replaceable class="parameter">seqname</replaceable> [ INCREMENT [ BY ] <replaceable class="parameter">increment</replaceable> ]
25
25
[ MINVALUE <replaceable class="parameter">minvalue</replaceable> ] [ MAXVALUE <replaceable class="parameter">maxvalue</replaceable> ]
26
- [ START <replaceable class="parameter">start</replaceable> ] [ CACHE <replaceable class="parameter">cache</replaceable> ] [ CYCLE ]
26
+ [ START [ WITH ] <replaceable class="parameter">start</replaceable> ] [ CACHE <replaceable class="parameter">cache</replaceable> ] [ [ NO ] CYCLE ]
27
27
</synopsis>
28
28
29
29
<refsect2 id="R2-SQL-CREATESEQUENCE-1">
@@ -130,8 +130,8 @@ CREATE [ TEMPORARY | TEMP ] SEQUENCE <replaceable class="parameter">seqname</rep
130
130
<term>CYCLE</term>
131
131
<listitem>
132
132
<para>
133
- The optional CYCLE keyword may be used to enable the sequence
134
- to wrap around when the
133
+ The optional <option> CYCLE</option> keyword may be used to enable
134
+ the sequence to wrap around when the
135
135
<replaceable class="parameter">maxvalue</replaceable> or
136
136
<replaceable class="parameter">minvalue</replaceable> has been
137
137
reached by
@@ -140,11 +140,22 @@ CREATE [ TEMPORARY | TEMP ] SEQUENCE <replaceable class="parameter">seqname</rep
140
140
<replaceable class="parameter">minvalue</replaceable> or
141
141
<replaceable class="parameter">maxvalue</replaceable>,
142
142
respectively.
143
- Without CYCLE, after the limit is reached <function>nextval</> calls
144
- will return an error.
145
143
</para>
146
144
</listitem>
147
145
</varlistentry>
146
+
147
+ <varlistentry>
148
+ <term>NO CYCLE</term>
149
+ <listitem>
150
+ <para>
151
+ If the optional <option>NO CYCLE</option> keyword is specified, any
152
+ calls to <function>nextval</function> after the sequence has reached
153
+ its maximum value will return an error. If neither
154
+ <option>CYCLE</option> or <option>NO CYCLE</option> are specified,
155
+ <option>NO CYCLE</option> is the default.
156
+ </para>
157
+ </listitem>
158
+ </varlistentry>
148
159
</variablelist>
149
160
</para>
150
161
</refsect2>
0 commit comments