11<!--
2- $PostgreSQL: pgsql/doc/src/sgml/ref/alter_sequence.sgml,v 1.17 2007/07 /0301:30:35 neilc Exp $
2+ $PostgreSQL: pgsql/doc/src/sgml/ref/alter_sequence.sgml,v 1.18 2007/10 /0316:48:43 tgl Exp $
33PostgreSQL documentation
44-->
55
@@ -28,8 +28,8 @@ ALTER SEQUENCE <replaceable class="parameter">name</replaceable> [ INCREMENT [ B
2828 [ MINVALUE <replaceable class="parameter">minvalue</replaceable> | NO MINVALUE ] [ MAXVALUE <replaceable class="parameter">maxvalue</replaceable> | NO MAXVALUE ]
2929 [ RESTART [ WITH ] <replaceable class="parameter">start</replaceable> ] [ CACHE <replaceable class="parameter">cache</replaceable> ] [ [ NO ] CYCLE ]
3030 [ 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>
3231ALTER 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>
3333 </synopsis>
3434 </refsynopsisdiv>
3535
@@ -184,19 +184,19 @@ ALTER SEQUENCE <replaceable class="parameter">name</replaceable> RENAME TO <repl
184184 </varlistentry>
185185
186186 <varlistentry>
187- <term><replaceable class="parameter">new_schema </replaceable></term>
187+ <term><replaceable class="parameter">new_name </replaceable></term>
188188 <listitem>
189189 <para>
190- The newschema for the sequence.
190+ The newname for the sequence.
191191 </para>
192192 </listitem>
193193 </varlistentry>
194194
195195 <varlistentry>
196- <term><replaceable class="parameter">new_name </replaceable></term>
196+ <term><replaceable class="parameter">new_schema </replaceable></term>
197197 <listitem>
198198 <para>
199- The newname for the sequence.
199+ The newschema for the sequence.
200200 </para>
201201 </listitem>
202202 </varlistentry>
@@ -205,17 +205,6 @@ ALTER SEQUENCE <replaceable class="parameter">name</replaceable> RENAME TO <repl
205205 </para>
206206 </refsect1>
207207
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-
219208 <refsect1>
220209 <title>Notes</title>
221210
@@ -224,8 +213,8 @@ ALTER SEQUENCE serial RESTART WITH 105;
224213 same sequence, <command>ALTER SEQUENCE</command>'s effects on the sequence
225214 generation parameters are never rolled back;
226215 those changes take effect immediately and are not reversible. However,
227- the <literal>OWNED BY</> and <literal>SET SCHEMA</> clauses are ordinary
228- catalog updatesand can be rolled back.
216+ the <literal>OWNED BY</>, <literal>RENAME</>, and <literal>SET SCHEMA</>
217+ clauses cause ordinary catalog updatesthat can be rolled back.
229218 </para>
230219
231220 <para>
@@ -239,20 +228,30 @@ ALTER SEQUENCE serial RESTART WITH 105;
239228
240229 <para>
241230 Some variants of <command>ALTER TABLE</command> can be used with
242- sequences as well; for example, to rename a sequenceuse <command>ALTER
243- TABLE RENAME</command>.
231+ sequences as well; for example, to rename a sequenceit is also
232+ possible to use <command>ALTER TABLE RENAME</command>.
244233 </para>
245234 </refsect1>
246235
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>
247246
248247 <refsect1>
249248 <title>Compatibility</title>
250249
251250 <para>
252251 <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.
256255 </para>
257256 </refsect1>
258257