Re: [GENERAL] Is there an auto incrementing number field?

From: Christian Rudow <Christian(dot)Rudow(at)thinx(dot)ch>
To: Robert Chalmers <robert(at)chalmers(dot)com(dot)au>
Cc: PostgreSQL General <pgsql-general(at)hub(dot)org>
Subject: Re: [GENERAL] Is there an auto incrementing number field?
Date: 1999-06-24 06:56:59
Message-ID: 3771D6BB.49FD27E@thinx.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)Rudow(at)thinx(dot)ch
ThinX networked business services Stahlrain 10, CH-5200 Brugg
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Robert Chalmers 1999-06-24 07:07:15 Re: [GENERAL] Is there an auto incrementing number field?
Previous Message dustin sallings 1999-06-24 06:37:56 Re: [GENERAL] Is there an auto incrementing number field?