Re: serial data type - Mailing list pgsql-general

From Doug McNaught
Subject Re: serial data type
Date
Msg-id 874qlmq6vv.fsf@asmodeus.mcnaught.org
Whole thread Raw
In response to serial data type  (Tom Allison <tallison@tacocat.net>)
Responses Re: serial data type
List pgsql-general
Tom Allison <tallison@tacocat.net> writes:

> Can I use the serial data type in lieu of an 'auto_number' field?

What are the exact semantics of an "auto_number" field?

> I asked something like this some months ago and it seems that
> auto_number fields were addressed through a combination of triggers
> and procedures to ensure that there were do duplicate KEYS generated.
>
> Is it realistic to use the serial data type as a KEY?

Lots and lots of people do.  If you're just looking for a unique key
column for a single table, it works fine.

-Doug
--
Let us cross over the river, and rest under the shade of the trees.
   --T. J. Jackson, 1863

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: SMgrRelation hashtable corrupted
Next
From: Tom Allison
Date:
Subject: Re: serial data type