Setting sequence ids after importing data

Поиск
Список
Период
Сортировка
От Hari Patel
Тема Setting sequence ids after importing data
Дата
Msg-id 77a93e850605081743k284b71bby622c2e84918e265d@mail.gmail.com
обсуждение исходный текст
Ответы Re: Setting sequence ids after importing data  (Sean Davis <sdavis2@mail.nih.gov>)
Список pgsql-novice
Hi:

I am importing data from sqlite db into postgres. The tables have an id column that is obtained from a sequence.

To preserve the foreign key relationships, I need to preserve the ids while importing into postgres.

The problem is that after import, the sequences don't get incremented which leads to unique constraint violation errors further down.
How do I fix this ?

Thanks,
Hari

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

Предыдущее
От: John Purser
Дата:
Сообщение: Re: Command line option
Следующее
От: Sean Davis
Дата:
Сообщение: Re: Setting sequence ids after importing data