| From: | Francois Thomas <FrancoisT(at)alsdesign(dot)fr> |
|---|---|
| To: | "'pgsql-novice(at)postgresql(dot)org'" <pgsql-novice(at)postgresql(dot)org> |
| Subject: | Serial field |
| Date: | 2001-07-12 16:44:44 |
| Message-ID: | 28B4376D3C8AD411960300D0B73C48461F577C@PROXY |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | SuperDutyTA73 | 2001-07-12 19:47:16 | Best formal training for PostgreSQL use? |
| Previous Message | Jeroen Heijmans | 2001-07-12 09:06:42 | Table type attributes |