Re: Auto-incrementing field

From: Aarni Ruuhimäki / Megative Tmi / KYMI(dot)com <aarni(dot)ruuhimaki(at)kymi(dot)com>
To: "Jim Steil" <jim(dot)steil(at)customcall(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Auto-incrementing field
Date: 2002-07-29 16:53:41
Message-ID: 20020729165554.QVBM3204.fep06.tmt.tele.fi@there
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi !

Please consider using a scriplet of your own for the locking db, getting e.g.
the max id +1 as your next increment, inserting the record (probably only
with the new id) and then unlock the db.

Sometimes it is worth because auto-increment as index migth get you into
trouble in certain situations. Or if you get into an other sort of bad
situation with corrupted data, having used auto-increment as index will
double your trouble or your work amount atleast.

BR,

aarni

On Friday 26 July 2002 10:49 pm, you wrote:
> Is there a data type in PostgreSQL that will 'auto-increment'? I have used
> this in MS SQL Server in the past and would like to continue to do so with
> PostgreSQL. Thanks for any help...
>
> -Jim
>
> Jim Steil
> CustomCall Data Systems
> (608) 274-3009
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message denis 2002-07-30 05:10:27 Re: Trigger question
Previous Message Jillian Carroll 2002-07-29 16:14:32 Altering psqlodbc.h