pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Benjamin Krajmalnik <kraj@illumen.com>
To: pgsql-admin@postgresql.org
Subject: General question regarding sequences (Serial columns)
Date: Thu, 15 Jun 2006 11:20:03 -0600
Message-ID: <BF337097BDD9D849A2F4B818DDB27987029350@stash.stackdump.local> (raw)

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?




view thread (2+ messages)  latest in thread

Message-ID: <BF337097BDD9D849A2F4B818DDB27987029350@stash.stackdump.local>
Permalink:  ../BF337097BDD9D849A2F4B818DDB27987029350@stash.stackdump.local/
Also on:    postgresql.org/message-id/BF337097BDD9D849A2F4B818DDB27987029350@stash.stackdump.local

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: kraj@illumen.com
  Subject: Re: General question regarding sequences (Serial columns)
  In-Reply-To: <BF337097BDD9D849A2F4B818DDB27987029350@stash.stackdump.local>
  References: <BF337097BDD9D849A2F4B818DDB27987029350@stash.stackdump.local>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox