Re: Import id column then convert to SEQUENCE? - Mailing list pgsql-general

From Shoaib Mir
Subject Re: Import id column then convert to SEQUENCE?
Date
Msg-id AANLkTinpC8k2z+TAn6_Aosqp1NxNcEOxVN5ADuHkNeXL@mail.gmail.com
Whole thread Raw
In response to Import id column then convert to SEQUENCE?  (gvim <gvimrc@gmail.com>)
Responses Re: Import id column then convert to SEQUENCE?  (Shoaib Mir <shoaibmir@gmail.com>)
List pgsql-general


On Fri, Dec 10, 2010 at 2:44 PM, gvim <gvimrc@gmail.com> wrote:
I'm migrating a database from MySQL and need to keep the original `id` column (AUTO_INCREMENT) intact so my plan is to create an simple integer `id` column, import the data then convert the new `id` column to a SEQUENCE. Is this possible/the best solution? Maybe a migration utility would be better? Suggestions?


Try using SERIAL datatype. 

--
Shoaib Mir
http://shoaibmir.wordpress.com/

pgsql-general by date:

Previous
From: gvim
Date:
Subject: Import id column then convert to SEQUENCE?
Next
From: Shoaib Mir
Date:
Subject: Re: Import id column then convert to SEQUENCE?