Thread: record id

record id

From
"stephen"
Date:

I remember with oracle there was a self numbering record id field which we often used to cross reference tables.  Is there something like this with postgresql?

 

Stephen Choularton

0413 545 182

02 9999 2226

 

Re: record id

From
Tom Lane
Date:
"stephen" <mail@xesoftware.com.au> writes:
> I remember with oracle there was a self numbering record id field which
> we often used to cross reference tables.  Is there something like this
> with postgresql?

You want a serial column (or maybe just a sequence).  See the docs.

            regards, tom lane

Re: record id

From
Frank Bax
Date:
At 06:48 PM 4/26/07, stephen wrote:

>I remember with oracle there was a self numbering record id field which we
>often used to cross reference tables.  Is there something like this with
>postgresql?


http://www.postgresql.org/docs/faqs.FAQ.html

Use "serial".  Read 4.12; then 4.11.x