Re: Migration from MS Sql server using the plug-in

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Antti Toivanen" <antti(dot)toivanen(at)telemerkki(dot)fi>, <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Migration from MS Sql server using the plug-in
Date: 2002-05-29 11:32:55
Message-ID: D85C66DA59BA044EB96AB9683819CF610150B1@dogbert.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

-----Original Message-----
From: Antti Toivanen [mailto:antti(dot)toivanen(at)telemerkki(dot)fi]
Sent: 29 May 2002 12:15
To: pgadmin-support(at)postgresql(dot)org
Subject: [pgadmin-support] Migration from MS Sql server using
the plug-in

It doesnt import identity fields as serials, and thus is not
usable for databases using auto_increment.

It is usable because when it has finished it is trivial to do something
like:


SELECT max(serial_col) FROM tablename;
CREATE SEQUENCE serial_col_id START <result of previous query + 1>;
ALTER TABLE tablename ALTER COLUMN serial_col SET DEFAULT
nextval('serial_col_id');
CREATE UNIQUE INDEX serial_col_idx ON tablename (serial_col);

Regards, Dave.

Browse pgadmin-support by date

  From Date Subject
Next Message Raymond Chui 2002-05-29 14:42:27 How to partial dump the log in SQL?
Previous Message Antti Toivanen 2002-05-29 11:14:34 Migration from MS Sql server using the plug-in