Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit bda5750

Browse files
committed
Some editorial improvements for recently-added ALTER SEQUENCE/VIEW
documentation. Heikki and Tom
1 parent b3ab9b4 commit bda5750

File tree

2 files changed

+39
-27
lines changed

2 files changed

+39
-27
lines changed

doc/src/sgml/ref/alter_sequence.sgml

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
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 $
33
PostgreSQL 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>
3231
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>
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 new schema for the sequence.
190+
The new name 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 new name for the sequence.
199+
The new schema 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 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.
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 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>.
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

doc/src/sgml/ref/alter_view.sgml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_view.sgml,v 1.2 2007/07/08 17:47:38 tgl Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_view.sgml,v 1.3 2007/10/03 16:48:43 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -28,8 +28,9 @@ ALTER VIEW <replaceable>name</replaceable> RENAME TO <replaceable>newname</repla
2828
<title>Description</title>
2929

3030
<para>
31-
<command>ALTER VIEW</command> changes the definition of a
32-
view. To execute this command you must be the owner of the view.
31+
<command>ALTER VIEW</command> changes the definition of a view.
32+
The only currently available functionality is to rename the view.
33+
To execute this command you must be the owner of the view.
3334
</para>
3435
</refsect1>
3536

@@ -57,6 +58,18 @@ ALTER VIEW <replaceable>name</replaceable> RENAME TO <replaceable>newname</repla
5758
</variablelist>
5859
</refsect1>
5960

61+
<refsect1>
62+
<title>Notes</title>
63+
64+
<para>
65+
Some variants of <command>ALTER TABLE</command> can be used with
66+
views as well; for example, to rename a view it is also
67+
possible to use <command>ALTER TABLE RENAME</command>. To change
68+
the schema or owner of a view, you currently must use <command>ALTER
69+
TABLE</>.
70+
</para>
71+
</refsect1>
72+
6073
<refsect1>
6174
<title>Examples</title>
6275

0 commit comments

Comments
 (0)