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

Поиск
Список
Период
Сортировка
От Vijay Deval
Тема Re: Make an id field max(id)+1 rather than SERIAL
Дата
Msg-id 3D8DE9D2.24EA417A@giaspn01.vsnl.net.in
обсуждение исходный текст
Ответ на Make an id field max(id)+1 rather than SERIAL  (Rory Campbell-Lange <rory@campbell-lange.net>)
Список pgsql-novice
Hi
after inserting bulk data, Select Max of the sequence.

SELECT setval('abc_xyz_seq', max value);

should get the sequence in synchro.

Vijay

Rory Campbell-Lange wrote:
>
> I have problems after exporting then importing data into newly created
> databases that the sequence and the indexed serial fields get out of
> alignment.


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: table corruption... :(
Следующее
От: "Norman Khine"
Дата:
Сообщение: Subselect query for a multi table insert single query