From: | Oliver Elphick <olly(at)lfix(dot)co(dot)uk> |
---|---|
To: | Chris <chris(at)netlabz(dot)com> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: identity columns ? |
Date: | 2002-04-04 22:27:16 |
Message-ID: | 1017959236.1427.6.camel@linda |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(dot)Elphick(at)lfix(dot)co(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Chris | 2002-04-04 22:32:06 | identity |
Previous Message | Ugly Hippo | 2002-04-04 22:15:45 | Re: Transactions in Postgres |