General question regarding sequences (Serial columns)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux