Make an id field max(id)+1 rather than SERIAL

Поиск
Список
Период
Сортировка
От Rory Campbell-Lange
Тема Make an id field max(id)+1 rather than SERIAL
Дата
Msg-id 20020919141417.GB6565@campbell-lange.net
обсуждение исходный текст
Ответы Re: Make an id field max(id)+1 rather than SERIAL  (Oliver Elphick <olly@lfix.co.uk>)
Список pgsql-novice
I have problems after exporting then importing data into newly created
databases that the sequence and the indexed serial fields get out of
alignment.

I wonder if it isn't better to always simply insert ids using some sort
of function or other procedure to calculate on each insert a new unique
id number.

Is this feasible?

Thanks for any help.
Rory

--
Rory Campbell-Lange
<rory@campbell-lange.net>
<www.campbell-lange.net>

В списке pgsql-novice по дате отправления:

Предыдущее
От: Ciprian Popovici
Дата:
Сообщение: Re: restricting similar rows
Следующее
От: Oliver Elphick
Дата:
Сообщение: Re: Make an id field max(id)+1 rather than SERIAL