General question regarding sequences (Serial columns)

Поиск
Список
Период
Сортировка
От Benjamin Krajmalnik
Тема General question regarding sequences (Serial columns)
Дата
Msg-id BF337097BDD9D849A2F4B818DDB27987029350@stash.stackdump.local
обсуждение исходный текст
Список pgsql-admin
I am in the process of writing a migration utility to move data from a
SQL Server to PostgreSQL.  The original schema contains identity fields.
When converting the schema, I have 2 option - either make them serial
(or bigserisl) columns, with the associated automatic constraint, or
declaring the associated sequences separately and invoking the
generators in code.

If I were to use the former (use Serial/BigSerial), is there a command
which I can issue to keep PostgreSQL from using the sequence, and
therefore copying over the original identity field value?  Something
equivalent to SQL Server's "SET IDENTITY_INSERT" command?


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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: database physical storage
Следующее
От: "Benjamin Krajmalnik"
Дата:
Сообщение: Re: General question regarding sequences (Serial columns)