Обсуждение: Migration from MS Sql server using the plug-in

Поиск
Список
Период
Сортировка

Migration from MS Sql server using the plug-in

От
"Antti Toivanen"
Дата:

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

 

Best regards,

 

Antti Toivanen

Telemerkki Oy

Raturinkuja 10-12

05400 JOKELA

FINLAND

 

Puh: 09-413 7211

Email: antti.toivanen@telemerkki.fi

 

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

От
"Dave Page"
Дата:
 
-----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.