Serial field - Mailing list pgsql-novice

From Francois Thomas
Subject Serial field
Date
Msg-id 28B4376D3C8AD411960300D0B73C48461F577C@PROXY
Whole thread Raw
Responses Re: Serial field
List pgsql-novice
Hello to all

Unable to find an answer by searching the list archive, I ask my question
here:
I want to migrate a database to PostgreSQL 6.5.2
I need an auto-increment field. I first tried the SERIAL type, but it
doesn't fit my needs.
In fact, I want to:
1/ keep the original INT value of my existing records from another server
(say, first row can be "1", second "3", next one "17",...)
2/ have an automatic incrementation of the last value for a new record. For
exemple, with the values above and a SERIAL field, the default value for a
new field would be "1" (first use of the sequence) instead of "18" (last
value+1)..
I hope my english is not too obscure !
Any advice will be welcome
Regards

--
François THOMAS

pgsql-novice by date:

Previous
From: "Oliver Elphick"
Date:
Subject: Re: newbie question
Next
From: Jason Earl
Date:
Subject: Re: Serial field