Re: Migration from MS Sql server using the plug-in - Mailing list pgadmin-support

From Dave Page
Subject Re: Migration from MS Sql server using the plug-in
Date
Msg-id D85C66DA59BA044EB96AB9683819CF610150B1@dogbert.vale-housing.co.uk
Whole thread Raw
In response to Migration from MS Sql server using the plug-in  ("Antti Toivanen" <antti.toivanen@telemerkki.fi>)
List pgadmin-support
 
-----Original Message-----
From: Antti Toivanen [mailto:antti.toivanen@telemerkki.fi]
Sent: 29 May 2002 12:15
To: pgadmin-support@postgresql.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.

pgadmin-support by date:

Previous
From: "Antti Toivanen"
Date:
Subject: Migration from MS Sql server using the plug-in
Next
From: "Raymond Chui"
Date:
Subject: How to partial dump the log in SQL?