Re: Converting from pgsql to sqlserver? - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: Converting from pgsql to sqlserver?
Date
Msg-id 3BB2F5FF.C84F47C5@tm.ee
Whole thread Raw
In response to Converting from pgsql to sqlserver?  (armindo.dias@dhvmc.pt)
List pgsql-hackers
> armindo.dias@dhvmc.pt wrote:
> >
> > Greetings.
> > I don´t know if this is the right place to ask this, sorry if this don't
> > belong here.
> > I begun this week working in a new firm. They use linux and PostgreSQL as
> > the database for the Intranet site and for the management of CV's and
> > Knowledge Management (they have an on-line system to manage and search
> > information about workers of the firm and projects they have).
> >
> > They now want to convert from the current linux/postgresql platform to
> > Windows and SQLServer.

If you stay away from IIS (and Internet as a whole) you should be quite 
safe on Windows platforms ;)

see: http://news.cnet.com/news/0-1003-200-7294516.html?tag=mainstry

> > I've never worked before with linux or PostgreSQL so
> > i know nothing about the capabilities of this combo.

Should be capable enough ;)

PG dump produces mostly ANSI-SQL compatible script that will recreate
the 
database. (Older versions dump suome stuff, like foreign keys as system 
table modifications, so you have to modify at least that ).

You may also have to change type names, as pg_dump uses often original 
postgreSQL type names and not their ANSI equivalents. (It is meant to be 
primarily a backup tool, not porting tool)

The PL/PGSQL and Transact-SQL (or whatever MS calls it) are quite 
different though, so any stored procs have to be rewritten.

> > My question are:
> >
> > - the PostgreSQL database has a lot of information. Is it possible to
> > migrate the data of the PostgreSQL to SQLServer in Windows? What do i need
> > to do?

pg_dump -D -a dbname

> >
> > - is it possible to migrate the tables relationships (the relational schema)
> > of the DB to SQLServer or do i have to build the DB from scratch?

pg_dump -s dbname

-------------------
Hannu


pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: multibyte performance
Next
From: mlw
Date:
Subject: Re: Spinlock performance improvement proposal