Re: Porting MySQL data types to PostgreSQL

From: Michael Glaesemann <grzm(at)seespotcode(dot)net>
To: "Gautam Sampathkumar" <gsampathkumar(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Porting MySQL data types to PostgreSQL
Date: 2007-07-26 01:51:30
Message-ID: E5BC850B-F06D-4A96-95A0-CD20C05F5D1B@seespotcode.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Jul 24, 2007, at 12:47 , Gautam Sampathkumar wrote:

> Does this mean I'd have to essentially double the space occupied by
> most
> database columns e.g convert mysql integer to postgresql bigint?

Only if your unsigned 4-byte integers actually exceed 2,147,483,647.
I suppose you could also use views and rules to automatically offset
the values by the appropriate amount (e.g., subtract -2,147,483,648
on insert and update, add 2,147,483,648 on select), but that sounds
like more trouble than it'd be worth.

Michael Glaesemann
grzm seespotcode net

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Glaesemann 2007-07-26 02:37:11 Re: Porting MySQL data types to PostgreSQL
Previous Message Tatsuo Ishii 2007-07-26 01:28:37 Re: using Tsearch2 for chemical text