Commit 839cea88 authored by Tom Lane's avatar Tom Lane

Minor copy-editing.

parent a9c1ff66
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.125 2003/10/09 19:13:48 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.126 2003/10/16 04:52:21 tgl Exp $
--> -->
<chapter id="datatype"> <chapter id="datatype">
...@@ -682,7 +682,7 @@ NUMERIC ...@@ -682,7 +682,7 @@ NUMERIC
<para> <para>
The data types <type>serial</type> and <type>bigserial</type> The data types <type>serial</type> and <type>bigserial</type>
are not true types, but merely are not true types, but merely
a notational convenience for setting up identifier columns a notational convenience for setting up unique identifier columns
(similar to the <literal>AUTO_INCREMENT</literal> property (similar to the <literal>AUTO_INCREMENT</literal> property
supported by some other databases). In the current supported by some other databases). In the current
implementation, specifying implementation, specifying
...@@ -722,10 +722,10 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> ( ...@@ -722,10 +722,10 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (
</note> </note>
<para> <para>
To use a <type>serial</type> column to insert the next value of To insert the next value of the sequence into the <type>serial</type>
the sequence into the table, specify that the <type>serial</type> column, specify that the <type>serial</type>
column should be assigned the default value. This can be done column should be assigned its default value. This can be done
either be excluding from the column from the list of columns in either by excluding the column from the list of columns in
the <command>INSERT</command> statement, or through the use of the <command>INSERT</command> statement, or through the use of
the <literal>DEFAULT</literal> keyword. the <literal>DEFAULT</literal> keyword.
</para> </para>
...@@ -741,8 +741,8 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> ( ...@@ -741,8 +741,8 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (
</para> </para>
<para> <para>
The sequence created by a <type>serial</type> type is The sequence created for a <type>serial</type> column is
automatically dropped when the owning column is dropped and automatically dropped when the owning column is dropped, and
cannot be dropped otherwise. (This was not true in cannot be dropped otherwise. (This was not true in
<productname>PostgreSQL</productname> releases before 7.3. Note <productname>PostgreSQL</productname> releases before 7.3. Note
that this automatic drop linkage will not occur for a sequence that this automatic drop linkage will not occur for a sequence
...@@ -751,9 +751,11 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> ( ...@@ -751,9 +751,11 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (
dependency link.) Furthermore, this dependency between sequence dependency link.) Furthermore, this dependency between sequence
and column is made only for the <type>serial</> column itself; if and column is made only for the <type>serial</> column itself; if
any other columns reference the sequence (perhaps by manually any other columns reference the sequence (perhaps by manually
calling the <function>nextval</>) function), they may be broken calling the <function>nextval</> function), they will be broken
if the sequence is removed. Using <type>serial</> columns in if the sequence is removed. Using a <type>serial</> column's sequence
fashion is considered bad form. in such a fashion is considered bad form; if you wish to feed several
columns from the same sequence generator, create the sequence as an
independent object.
</para> </para>
</sect2> </sect2>
</sect1> </sect1>
......
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