Thread: MySQL to Postgres.

MySQL to Postgres.

From
Prabu Subroto
Date:
Dear my friends...

I am planning to migrate my database from MySQL to
Postgres since the MySQL does not have subquery except
it 4.1. And I can not wait until the 4.1 stable
version released and included in SuSE distro.

I did mysqldump (into a file, basisdata.txt) and I am
going to do its query qith pgaccess or pgsql.

I tried to import the database (do the query of
basisdata.txt) with pgaccess but I couldn't. Because
pgaccess support only one by one importing table.

I tried with pgsql, look for the suitable command to
do that with "\h" in the pgsql console. But I could
not find the suitable command.

Anybody would be so nice to tell me how I can do that
with pgaccess and/or pgsql ?

Thank you very much in advance.




__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail

Re: MySQL to Postgres.

From
Richard Huxton
Date:
Prabu Subroto wrote:
> Dear my friends...
>
> I am planning to migrate my database from MySQL to
> Postgres since the MySQL does not have subquery except
> it 4.1. And I can not wait until the 4.1 stable
> version released and included in SuSE distro.
>
> I did mysqldump (into a file, basisdata.txt) and I am
> going to do its query qith pgaccess or pgsql.

You'll probably want \copy or COPY FROM if you've got tab/whatever
separated data.

You might want to look at http://techdocs.postgresql.org/ for notes on
converting from MySQL to PostgreSQL too.

--
   Richard Huxton
   Archonet Ltd