General question regarding sequences (Serial columns)

From: "Benjamin Krajmalnik" <kraj(at)illumen(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: General question regarding sequences (Serial columns)
Date: 2006-06-15 17:20:03
Message-ID: BF337097BDD9D849A2F4B818DDB27987029350@stash.stackdump.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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?

Browse pgsql-admin by date

  From Date Subject
Next Message Benjamin Krajmalnik 2006-06-15 17:31:37 Re: General question regarding sequences (Serial columns)
Previous Message Michael Fuhr 2006-06-15 13:11:51 Re: database physical storage