Re: Import id column then convert to SEQUENCE?

From: Shoaib Mir <shoaibmir(at)gmail(dot)com>
To: gvim <gvimrc(at)gmail(dot)com>
Cc: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Re: Import id column then convert to SEQUENCE?
Date: 2010-12-10 03:53:08
Message-ID: AANLkTinpC8k2z+TAn6_Aosqp1NxNcEOxVN5ADuHkNeXL@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Dec 10, 2010 at 2:44 PM, gvim <gvimrc(at)gmail(dot)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/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shoaib Mir 2010-12-10 03:56:25 Re: Import id column then convert to SEQUENCE?
Previous Message gvim 2010-12-10 03:44:32 Import id column then convert to SEQUENCE?