X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 272B79FA5E7 for ; Thu, 15 Jun 2006 14:20:18 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 21757-10 for ; Thu, 15 Jun 2006 14:20:06 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from stash.illumen.com (unknown [64.207.29.137]) by postgresql.org (Postfix) with ESMTP id 255769FA5BE for ; Thu, 15 Jun 2006 14:20:05 -0300 (ADT) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Subject: General question regarding sequences (Serial columns) X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Thu, 15 Jun 2006 11:20:03 -0600 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: General question regarding sequences (Serial columns) Thread-Index: AcaQfYCkC/UjXWJdQHSn1VBHiGYDmQAIJxeg From: "Benjamin Krajmalnik" To: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/128 X-Sequence-Number: 22090 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?