diff options
| author | Bruce Momjian | 2003-11-19 16:50:48 +0000 |
|---|---|---|
| committer | Bruce Momjian | 2003-11-19 16:50:48 +0000 |
| commit | 022da0ed7af50d532f41da0716d5a4053ddf3ca6 (patch) | |
| tree | 15e0fd2e4b8bdecf45448b966585cf00ae3af56a /doc/FAQ | |
| parent | cfeca62148582a05466362f1957572f5a9900ab5 (diff) | |
SERIAL no longer creates an index by default, as of 7.3.
Diffstat (limited to 'doc/FAQ')
| -rw-r--r-- | doc/FAQ | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -1,7 +1,7 @@ Frequently Asked Questions (FAQ) for PostgreSQL - Last updated: Sat Nov 15 23:41:03 EST 2003 + Last updated: Wed Nov 19 11:50:04 EST 2003 Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us) @@ -879,8 +879,8 @@ BYTEA bytea variable-length byte array (null-byte safe) 4.15.1) How do I create a serial/auto-incrementing field? - PostgreSQL supports a SERIAL data type. It auto-creates a sequence and - index on the column. For example, this: + PostgreSQL supports a SERIAL data type. It auto-creates a sequence. + For example, this: CREATE TABLE person ( id SERIAL, name TEXT @@ -892,7 +892,6 @@ BYTEA bytea variable-length byte array (null-byte safe) id INT4 NOT NULL DEFAULT nextval('person_id_seq'), name TEXT ); - CREATE UNIQUE INDEX person_id_key ON person ( id ); See the create_sequence manual page for more information about sequences. You can also use each row's OID field as a unique value. |
