1
1
<!--
2
- $PostgreSQL: pgsql/doc/src/sgml/ref/alter_sequence.sgml,v 1.17 2007/07 /03 01:30:35 neilc Exp $
2
+ $PostgreSQL: pgsql/doc/src/sgml/ref/alter_sequence.sgml,v 1.18 2007/10 /03 16:48:43 tgl Exp $
3
3
PostgreSQL documentation
4
4
-->
5
5
@@ -28,8 +28,8 @@ ALTER SEQUENCE <replaceable class="parameter">name</replaceable> [ INCREMENT [ B
28
28
[ MINVALUE <replaceable class="parameter">minvalue</replaceable> | NO MINVALUE ] [ MAXVALUE <replaceable class="parameter">maxvalue</replaceable> | NO MAXVALUE ]
29
29
[ RESTART [ WITH ] <replaceable class="parameter">start</replaceable> ] [ CACHE <replaceable class="parameter">cache</replaceable> ] [ [ NO ] CYCLE ]
30
30
[ OWNED BY { <replaceable class="parameter">table</replaceable>.<replaceable class="parameter">column</replaceable> | NONE } ]
31
- ALTER SEQUENCE <replaceable class="parameter">name</replaceable> SET SCHEMA <replaceable class="parameter">new_schema</replaceable>
32
31
ALTER SEQUENCE <replaceable class="parameter">name</replaceable> RENAME TO <replaceable class="parameter">new_name</replaceable>
32
+ ALTER SEQUENCE <replaceable class="parameter">name</replaceable> SET SCHEMA <replaceable class="parameter">new_schema</replaceable>
33
33
</synopsis>
34
34
</refsynopsisdiv>
35
35
@@ -184,19 +184,19 @@ ALTER SEQUENCE <replaceable class="parameter">name</replaceable> RENAME TO <repl
184
184
</varlistentry>
185
185
186
186
<varlistentry>
187
- <term><replaceable class="parameter">new_schema </replaceable></term>
187
+ <term><replaceable class="parameter">new_name </replaceable></term>
188
188
<listitem>
189
189
<para>
190
- The new schema for the sequence.
190
+ The new name for the sequence.
191
191
</para>
192
192
</listitem>
193
193
</varlistentry>
194
194
195
195
<varlistentry>
196
- <term><replaceable class="parameter">new_name </replaceable></term>
196
+ <term><replaceable class="parameter">new_schema </replaceable></term>
197
197
<listitem>
198
198
<para>
199
- The new name for the sequence.
199
+ The new schema for the sequence.
200
200
</para>
201
201
</listitem>
202
202
</varlistentry>
@@ -205,17 +205,6 @@ ALTER SEQUENCE <replaceable class="parameter">name</replaceable> RENAME TO <repl
205
205
</para>
206
206
</refsect1>
207
207
208
- <refsect1>
209
- <title>Examples</title>
210
-
211
- <para>
212
- Restart a sequence called <literal>serial</literal>, at 105:
213
- <programlisting>
214
- ALTER SEQUENCE serial RESTART WITH 105;
215
- </programlisting>
216
- </para>
217
- </refsect1>
218
-
219
208
<refsect1>
220
209
<title>Notes</title>
221
210
@@ -224,8 +213,8 @@ ALTER SEQUENCE serial RESTART WITH 105;
224
213
same sequence, <command>ALTER SEQUENCE</command>'s effects on the sequence
225
214
generation parameters are never rolled back;
226
215
those changes take effect immediately and are not reversible. However,
227
- the <literal>OWNED BY</> and <literal>SET SCHEMA</> clauses are ordinary
228
- catalog updates and can be rolled back.
216
+ the <literal>OWNED BY</>, <literal>RENAME</>, and <literal>SET SCHEMA</>
217
+ clauses cause ordinary catalog updates that can be rolled back.
229
218
</para>
230
219
231
220
<para>
@@ -239,20 +228,30 @@ ALTER SEQUENCE serial RESTART WITH 105;
239
228
240
229
<para>
241
230
Some variants of <command>ALTER TABLE</command> can be used with
242
- sequences as well; for example, to rename a sequence use <command>ALTER
243
- TABLE RENAME</command>.
231
+ sequences as well; for example, to rename a sequence it is also
232
+ possible to use <command>ALTER TABLE RENAME</command>.
244
233
</para>
245
234
</refsect1>
246
235
236
+ <refsect1>
237
+ <title>Examples</title>
238
+
239
+ <para>
240
+ Restart a sequence called <literal>serial</literal>, at 105:
241
+ <programlisting>
242
+ ALTER SEQUENCE serial RESTART WITH 105;
243
+ </programlisting>
244
+ </para>
245
+ </refsect1>
247
246
248
247
<refsect1>
249
248
<title>Compatibility</title>
250
249
251
250
<para>
252
251
<command>ALTER SEQUENCE</command> conforms to the <acronym>SQL</acronym>
253
- standard,
254
- except for the <literal>OWNED BY</> and <literal> SET SCHEMA</literal>
255
- clauses, which are <productname>PostgreSQL</productname> extensions.
252
+ standard, except for the <literal>OWNED BY</>, <literal>RENAME</>, and
253
+ <literal>SET SCHEMA</literal> clauses, which are
254
+ <productname>PostgreSQL</productname> extensions.
256
255
</para>
257
256
</refsect1>
258
257
0 commit comments