1
1
<!--
2
- $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.125 2003/10/09 19:13:48 momjian Exp $
2
+ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.126 2003/10/16 04:52:21 tgl Exp $
3
3
-->
4
4
5
5
<chapter id="datatype">
@@ -682,7 +682,7 @@ NUMERIC
682
682
<para>
683
683
The data types <type>serial</type> and <type>bigserial</type>
684
684
are not true types, but merely
685
- a notational convenience for setting up identifier columns
685
+ a notational convenience for setting upunique identifier columns
686
686
(similar to the <literal>AUTO_INCREMENT</literal> property
687
687
supported by some other databases). In the current
688
688
implementation, specifying
@@ -722,10 +722,10 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (
722
722
</note>
723
723
724
724
<para>
725
- Touse a <type>serial</type> column to insert the next value of
726
- the sequence into the table , specify that the <type>serial</type>
727
- column should be assignedthe default value. This can be done
728
- eitherbe excluding from the column from the list of columns in
725
+ Toinsert the next value of the sequence into the <type>serial</type>
726
+ column , specify that the <type>serial</type>
727
+ column should be assignedits default value. This can be done
728
+ eitherby excluding the column from the list of columns in
729
729
the <command>INSERT</command> statement, or through the use of
730
730
the <literal>DEFAULT</literal> keyword.
731
731
</para>
@@ -741,8 +741,8 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (
741
741
</para>
742
742
743
743
<para>
744
- The sequence createdby a <type>serial</type>type is
745
- automatically dropped when the owning column is dropped and
744
+ The sequence createdfor a <type>serial</type>column is
745
+ automatically dropped when the owning column is dropped, and
746
746
cannot be dropped otherwise. (This was not true in
747
747
<productname>PostgreSQL</productname> releases before 7.3. Note
748
748
that this automatic drop linkage will not occur for a sequence
@@ -751,9 +751,11 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (
751
751
dependency link.) Furthermore, this dependency between sequence
752
752
and column is made only for the <type>serial</> column itself; if
753
753
any other columns reference the sequence (perhaps by manually
754
- calling the <function>nextval</>) function), they may be broken
755
- if the sequence is removed. Using <type>serial</> columns in
756
- fashion is considered bad form.
754
+ calling the <function>nextval</> function), they will be broken
755
+ if the sequence is removed. Using a <type>serial</> column's sequence
756
+ in such a fashion is considered bad form; if you wish to feed several
757
+ columns from the same sequence generator, create the sequence as an
758
+ independent object.
757
759
</para>
758
760
</sect2>
759
761
</sect1>