Re: identity columns ? - Mailing list pgsql-novice

From Oliver Elphick
Subject Re: identity columns ?
Date
Msg-id 1017959236.1427.6.camel@linda
Whole thread Raw
In response to identity columns ?  ("Chris" <chris@netlabz.com>)
List pgsql-novice
On Thu, 2002-04-04 at 22:24, Chris wrote:
> Hello,
>
> Two questions -
>
> 1. M$ SQL Server has an identity column which generates a sequential number
> for you, we use this often for unique primary keys. Does postgres support
> anything like  this ?

We have the SERIAL datatype (an INTEGER field with an associated
sequence).

Don't use oids for referencing - they should be for database internal
use only.

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C

     "Thou will keep him in perfect peace, whose mind is
      stayed on thee, because he trusts in thee."
                                        Isaiah 26:3

Attachment

pgsql-novice by date:

Previous
From: Ugly Hippo
Date:
Subject: Re: Transactions in Postgres
Next
From: "Chris"
Date:
Subject: identity