Serial - Mailing list pgsql-sql

From Shavonne Marietta Wijesinghe
Subject Serial
Date
Msg-id 008301c775d1$4b224420$1102a8c0@dream
Whole thread Raw
Responses Re: Serial  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Re: Serial  (Scott Marlowe <smarlowe@g2switchworks.com>)
List pgsql-sql
Ok so i'm posting alot in the forums. Anyway for a change i have another problem ^___^
 
I have a table that has a field n_gen serial NOT NULL
 
ermm let me explain. I have 5 records inserted (n_gen = 1, 2, 3, 4, 5)
 
At a surtain point i DELETE the record 2 and UPDATE the record 5 with the n_gen 2. So now i have 4 records (n_gen = 1, 2 (EX 5), 3, 4)  Upto this point i'm ok.
 
The problem is when i INSERT a new record. It takes the value n_gen = 6 but i need it to take the value 5. It keeps a record of the delete records.
 
Is there anyway in PostgreSQL i can change it? or another progressive that i can use for n_gen ??
 
Thanks alot.
 
 
Shavonne Wijesinghe

pgsql-sql by date:

Previous
From: "Shavonne Marietta Wijesinghe"
Date:
Subject: Re: Update problem.
Next
From: "A. Kretschmer"
Date:
Subject: Re: Serial