Re: Postgres SQL Syntax - Mailing list pgsql-general

From Merlin Moncure
Subject Re: Postgres SQL Syntax
Date
Msg-id b42b73150702091019u6684abat259c74adab6e17f9@mail.gmail.com
Whole thread Raw
In response to Re: Postgres SQL Syntax  ("Jim C." <jlistnews@gmail.com>)
List pgsql-general
On 2/2/07, Jim C. <jlistnews@gmail.com> wrote:
> > Besides what Tom says, '0' is a string, not an integer.  PG takes
> > it, but it's a bad habit.
>
> Maybe it is and maybe it isn't.  I wouldn't know.  I'm merely the
> unfortunate soul chosen to convert this from MySQL to Postgres. :-/
>
> I've been working on it for a week now. I've got to say that it pains me
> to know that there is apparently no open standard in use for
> importing/exporting data from one db to another. XML would do the job,
> wouldn't it?
>
> If I'm wrong, I sure would like to hear about it.

the open standard to convert data from one database to another,
unfortunately, is SQL.  SQL is incomplete, illogical, and obscure, so
here we are.

moving data from mysql to postgresql is easy...its the table schemas
that are tough.  If you have the table schemas done, you can

mysqldump --compatible=postgresql | psql

which should work for 90% of tables, because mysql supports only a
subset of the types postgresql supports.

the schemas are a bit trickier...you have to do them by hand or use a
conversion tool.  one such tool is DTS.  if you look around you might
find something else though.

merlin

pgsql-general by date:

Previous
From: "Chandra Sekhar Surapaneni"
Date:
Subject: Re: Some unknown error in a function
Next
From: Marc Branchaud
Date:
Subject: Re: Modifying a foreign key constraint?