Commit bda5750a authored by Tom Lane's avatar Tom Lane

Some editorial improvements for recently-added ALTER SEQUENCE/VIEW

documentation.  Heikki and Tom
parent b3ab9b45
<!-- <!--
$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 PostgreSQL documentation
--> -->
...@@ -28,8 +28,8 @@ ALTER SEQUENCE <replaceable class="parameter">name</replaceable> [ INCREMENT [ B ...@@ -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 ] [ 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 ] [ 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 } ] [ 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> RENAME TO <replaceable class="parameter">new_name</replaceable>
ALTER SEQUENCE <replaceable class="parameter">name</replaceable> SET SCHEMA <replaceable class="parameter">new_schema</replaceable>
</synopsis> </synopsis>
</refsynopsisdiv> </refsynopsisdiv>
...@@ -184,19 +184,19 @@ ALTER SEQUENCE <replaceable class="parameter">name</replaceable> RENAME TO <repl ...@@ -184,19 +184,19 @@ ALTER SEQUENCE <replaceable class="parameter">name</replaceable> RENAME TO <repl
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><replaceable class="parameter">new_schema</replaceable></term> <term><replaceable class="parameter">new_name</replaceable></term>
<listitem> <listitem>
<para> <para>
The new schema for the sequence. The new name for the sequence.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><replaceable class="parameter">new_name</replaceable></term> <term><replaceable class="parameter">new_schema</replaceable></term>
<listitem> <listitem>
<para> <para>
The new name for the sequence. The new schema for the sequence.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -205,17 +205,6 @@ ALTER SEQUENCE <replaceable class="parameter">name</replaceable> RENAME TO <repl ...@@ -205,17 +205,6 @@ ALTER SEQUENCE <replaceable class="parameter">name</replaceable> RENAME TO <repl
</para> </para>
</refsect1> </refsect1>
<refsect1>
<title>Examples</title>
<para>
Restart a sequence called <literal>serial</literal>, at 105:
<programlisting>
ALTER SEQUENCE serial RESTART WITH 105;
</programlisting>
</para>
</refsect1>
<refsect1> <refsect1>
<title>Notes</title> <title>Notes</title>
...@@ -224,8 +213,8 @@ ALTER SEQUENCE serial RESTART WITH 105; ...@@ -224,8 +213,8 @@ ALTER SEQUENCE serial RESTART WITH 105;
same sequence, <command>ALTER SEQUENCE</command>'s effects on the sequence same sequence, <command>ALTER SEQUENCE</command>'s effects on the sequence
generation parameters are never rolled back; generation parameters are never rolled back;
those changes take effect immediately and are not reversible. However, those changes take effect immediately and are not reversible. However,
the <literal>OWNED BY</> and <literal>SET SCHEMA</> clauses are ordinary the <literal>OWNED BY</>, <literal>RENAME</>, and <literal>SET SCHEMA</>
catalog updates and can be rolled back. clauses cause ordinary catalog updates that can be rolled back.
</para> </para>
<para> <para>
...@@ -239,20 +228,30 @@ ALTER SEQUENCE serial RESTART WITH 105; ...@@ -239,20 +228,30 @@ ALTER SEQUENCE serial RESTART WITH 105;
<para> <para>
Some variants of <command>ALTER TABLE</command> can be used with Some variants of <command>ALTER TABLE</command> can be used with
sequences as well; for example, to rename a sequence use <command>ALTER sequences as well; for example, to rename a sequence it is also
TABLE RENAME</command>. possible to use <command>ALTER TABLE RENAME</command>.
</para> </para>
</refsect1> </refsect1>
<refsect1>
<title>Examples</title>
<para>
Restart a sequence called <literal>serial</literal>, at 105:
<programlisting>
ALTER SEQUENCE serial RESTART WITH 105;
</programlisting>
</para>
</refsect1>
<refsect1> <refsect1>
<title>Compatibility</title> <title>Compatibility</title>
<para> <para>
<command>ALTER SEQUENCE</command> conforms to the <acronym>SQL</acronym> <command>ALTER SEQUENCE</command> conforms to the <acronym>SQL</acronym>
standard, standard, except for the <literal>OWNED BY</>, <literal>RENAME</>, and
except for the <literal>OWNED BY</> and <literal>SET SCHEMA</literal> <literal>SET SCHEMA</literal> clauses, which are
clauses, which are <productname>PostgreSQL</productname> extensions. <productname>PostgreSQL</productname> extensions.
</para> </para>
</refsect1> </refsect1>
......
<!-- <!--
$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 PostgreSQL documentation
--> -->
...@@ -28,8 +28,9 @@ ALTER VIEW <replaceable>name</replaceable> RENAME TO <replaceable>newname</repla ...@@ -28,8 +28,9 @@ ALTER VIEW <replaceable>name</replaceable> RENAME TO <replaceable>newname</repla
<title>Description</title> <title>Description</title>
<para> <para>
<command>ALTER VIEW</command> changes the definition of a <command>ALTER VIEW</command> changes the definition of a view.
view. To execute this command you must be the owner of the view. The only currently available functionality is to rename the view.
To execute this command you must be the owner of the view.
</para> </para>
</refsect1> </refsect1>
...@@ -57,6 +58,18 @@ ALTER VIEW <replaceable>name</replaceable> RENAME TO <replaceable>newname</repla ...@@ -57,6 +58,18 @@ ALTER VIEW <replaceable>name</replaceable> RENAME TO <replaceable>newname</repla
</variablelist> </variablelist>
</refsect1> </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> <refsect1>
<title>Examples</title> <title>Examples</title>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment