Re: migrating numeric to serial from MSSQL to postgres

From: Terry Fielder <terry(at)ashtonwoodshomes(dot)com>
To: Kenneth Gonsalves <lawgon(at)thenilgiris(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: migrating numeric to serial from MSSQL to postgres
Date: 2006-10-15 13:54:45
Message-ID: 45323DA5.1080601@ashtonwoodshomes.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I believe:
IDENTITY(1, 1) just means "Primary Key" in M$SQL

numeric 18,0 means a numeric field of zero decimal points. Hence we are
looking at a 18 byte integer. bigint is not big enough, so probably
should use the same in numeric 18,0 in postgres

There may be a way to get MSSQL to dump a SQL compliant dump, which
would make a migration to postgres much easier if your schema is large.
Without a SQL compliant dump, you have a lot of cleaning up/tweaking the
dump to make it readable by Postgres (but that's what I have done the
few times in the past I have had to do that, fortunately not for many
statements :)

Terry Fielder
terry(at)greatgulfhomes(dot)com
Associate Director Software Development and Deployment
Great Gulf Homes / Ashton Woods Homes
Fax: (416) 441-9085

Kenneth Gonsalves wrote:
> hi,
>
> am migrating a database from MSSQL to postgres. How would i migrate this:
>
> [Id] [numerc](18, 0) IDENTITY (1, 1)
>
> --
> regards
> kg
> http://lawgon.livejournal.com
> http://nrcfosshelpline.in/web/
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Daniel CAUNE 2006-10-15 15:23:01 Re: migrating numeric to serial from MSSQL to postgres
Previous Message Daniel CAUNE 2006-10-15 13:49:55 Re: migrating numeric to serial from MSSQL to postgres