Serial field

Поиск
Список
Период
Сортировка
От Francois Thomas
Тема Serial field
Дата
Msg-id 28B4376D3C8AD411960300D0B73C48461F577C@PROXY
обсуждение исходный текст
Ответы Re: Serial field  (Jason Earl <jdearl@yahoo.com>)
Список 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 по дате отправления:

Предыдущее
От: "Oliver Elphick"
Дата:
Сообщение: Re: newbie question
Следующее
От: Jason Earl
Дата:
Сообщение: Re: Serial field