Re: migrate from postgres to mysql

Поиск
Список
Период
Сортировка
От Harald Fuchs
Тема Re: migrate from postgres to mysql
Дата
Msg-id puy8vyebjy.fsf@srv.protecting.net
обсуждение исходный текст
Ответ на migrate from postgres to mysql  ("Fabio Benavides Murillo" <fabio@novasitios.com>)
Список pgsql-general
In article <1065126701.1431.8.camel@localhost.localdomain>,
Scott Cain <cain@cshl.org> writes:

> Well, I've not done it, but you could do a
>   pg_dump -s dbname >schema.sql
>   pg_dump -d -a dbname >data.sql

> to get just the schema in one file and the data in inserts in another
> file.  Then you could use a perl script driven by SQL::Translator (check
> http://www.cpan.org) to translate the schema from Pg to MySQL.  Create
> the schema in MySQL, then load via the inserts.

I'd replace the second call of pg_dump by a "COPY mytbl TO 'mytbl.txt'"
for each table in the DB and import it into MySQL with "LOAD DATA
[LOCAL] INFILE".  This would be much faster than INSERTing.

В списке pgsql-general по дате отправления:

Предыдущее
От: Shridhar Daithankar
Дата:
Сообщение: Re: PITR (was Re: Type of application that use
Следующее
От: Christopher Browne
Дата:
Сообщение: Re: book on advanced postgresql?