1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-05 09:19:17 +03:00

Some editorial improvements for recently-added ALTER SEQUENCE/VIEW

documentation.  Heikki and Tom
This commit is contained in:
Tom Lane 2007-10-03 16:48:43 +00:00
parent b3ab9b45da
commit bda5750a33
2 changed files with 39 additions and 27 deletions

View File

@ -1,5 +1,5 @@
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_sequence.sgml,v 1.17 2007/07/03 01:30:35 neilc Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_sequence.sgml,v 1.18 2007/10/03 16:48:43 tgl Exp $
PostgreSQL documentation
-->
@ -28,8 +28,8 @@ ALTER SEQUENCE <replaceable class="parameter">name</replaceable> [ INCREMENT [ B
[ MINVALUE <replaceable class="parameter">minvalue</replaceable> | NO MINVALUE ] [ MAXVALUE <replaceable class="parameter">maxvalue</replaceable> | NO MAXVALUE ]
[ RESTART [ WITH ] <replaceable class="parameter">start</replaceable> ] [ CACHE <replaceable class="parameter">cache</replaceable> ] [ [ NO ] CYCLE ]
[ OWNED BY { <replaceable class="parameter">table</replaceable>.<replaceable class="parameter">column</replaceable> | NONE } ]
ALTER SEQUENCE <replaceable class="parameter">name</replaceable> SET SCHEMA <replaceable class="parameter">new_schema</replaceable>
ALTER SEQUENCE <replaceable class="parameter">name</replaceable> RENAME TO <replaceable class="parameter">new_name</replaceable>
ALTER SEQUENCE <replaceable class="parameter">name</replaceable> SET SCHEMA <replaceable class="parameter">new_schema</replaceable>
</synopsis>
</refsynopsisdiv>
@ -183,15 +183,6 @@ ALTER SEQUENCE <replaceable class="parameter">name</replaceable> RENAME TO <repl
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable class="parameter">new_schema</replaceable></term>
<listitem>
<para>
The new schema for the sequence.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable class="parameter">new_name</replaceable></term>
<listitem>
@ -201,10 +192,47 @@ ALTER SEQUENCE <replaceable class="parameter">name</replaceable> RENAME TO <repl
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable class="parameter">new_schema</replaceable></term>
<listitem>
<para>
The new schema for the sequence.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1>
<title>Notes</title>
<para>
To avoid blocking of concurrent transactions that obtain numbers from the
same sequence, <command>ALTER SEQUENCE</command>'s effects on the sequence
generation parameters are never rolled back;
those changes take effect immediately and are not reversible. However,
the <literal>OWNED BY</>, <literal>RENAME</>, and <literal>SET SCHEMA</>
clauses cause ordinary catalog updates that can be rolled back.
</para>
<para>
<command>ALTER SEQUENCE</command> will not immediately affect
<function>nextval</> results in backends,
other than the current one, that have preallocated (cached) sequence
values. They will use up all cached values prior to noticing the changed
sequence generation parameters. The current backend will be affected
immediately.
</para>
<para>
Some variants of <command>ALTER TABLE</command> can be used with
sequences as well; for example, to rename a sequence it is also
possible to use <command>ALTER TABLE RENAME</command>.
</para>
</refsect1>
<refsect1>
<title>Examples</title>
@ -216,43 +244,14 @@ ALTER SEQUENCE serial RESTART WITH 105;
</para>
</refsect1>
<refsect1>
<title>Notes</title>
<para>
To avoid blocking of concurrent transactions that obtain numbers from the
same sequence, <command>ALTER SEQUENCE</command>'s effects on the sequence
generation parameters are never rolled back;
those changes take effect immediately and are not reversible. However,
the <literal>OWNED BY</> and <literal>SET SCHEMA</> clauses are ordinary
catalog updates and can be rolled back.
</para>
<para>
<command>ALTER SEQUENCE</command> will not immediately affect
<function>nextval</> results in backends,
other than the current one, that have preallocated (cached) sequence
values. They will use up all cached values prior to noticing the changed
sequence generation parameters. The current backend will be affected
immediately.
</para>
<para>
Some variants of <command>ALTER TABLE</command> can be used with
sequences as well; for example, to rename a sequence use <command>ALTER
TABLE RENAME</command>.
</para>
</refsect1>
<refsect1>
<title>Compatibility</title>
<para>
<command>ALTER SEQUENCE</command> conforms to the <acronym>SQL</acronym>
standard,
except for the <literal>OWNED BY</> and <literal>SET SCHEMA</literal>
clauses, which are <productname>PostgreSQL</productname> extensions.
standard, except for the <literal>OWNED BY</>, <literal>RENAME</>, and
<literal>SET SCHEMA</literal> clauses, which are
<productname>PostgreSQL</productname> extensions.
</para>
</refsect1>

View File

@ -1,5 +1,5 @@
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_view.sgml,v 1.2 2007/07/08 17:47:38 tgl Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_view.sgml,v 1.3 2007/10/03 16:48:43 tgl Exp $
PostgreSQL documentation
-->
@ -28,8 +28,9 @@ ALTER VIEW <replaceable>name</replaceable> RENAME TO <replaceable>newname</repla
<title>Description</title>
<para>
<command>ALTER VIEW</command> changes the definition of a
view. To execute this command you must be the owner of the view.
<command>ALTER VIEW</command> changes the definition of a view.
The only currently available functionality is to rename the view.
To execute this command you must be the owner of the view.
</para>
</refsect1>
@ -57,6 +58,18 @@ ALTER VIEW <replaceable>name</replaceable> RENAME TO <replaceable>newname</repla
</variablelist>
</refsect1>
<refsect1>
<title>Notes</title>
<para>
Some variants of <command>ALTER TABLE</command> can be used with
views as well; for example, to rename a view it is also
possible to use <command>ALTER TABLE RENAME</command>. To change
the schema or owner of a view, you currently must use <command>ALTER
TABLE</>.
</para>
</refsect1>
<refsect1>
<title>Examples</title>