Re: [GENERAL] Is there an auto incrementing number field? - Mailing list pgsql-general

From Christian Rudow
Subject Re: [GENERAL] Is there an auto incrementing number field?
Date
Msg-id 3771D6BB.49FD27E@thinx.ch
Whole thread Raw
In response to Is there an auto incrementing number field?  ("Robert Chalmers" <robert@chalmers.com.au>)
List pgsql-general
Robert Chalmers wrote:

> I'm looking through the 6.5 specs, and wondering if there is an
> Auto-Incrementing field in this release?
>
> of if not, is there a way of achieving this end? So that as I add a new
> record to a table, it's '#ID' for example is automatically added. 1, 2, 3,
> 4,... and so on

Im using "create sequence ...." on INTEGER id's.
You can also use SERIAL constraint (which does the same thing).

Try pgaccess to have a look at the current state of your sequences.
Nice.

Chris
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Christian Rudow                 E-Mail: Christian.Rudow@thinx.ch
ThinX networked business services    Stahlrain 10, CH-5200 Brugg
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

pgsql-general by date:

Previous
From: "Robert Chalmers"
Date:
Subject: Re: [GENERAL] Is there an auto incrementing number field?
Next
From: hkkang
Date:
Subject: [Question] ShmemCreate:cannot create region