Thread: Reading from Mysql & writting in PGsql
Dears,I need to read 1 field with select command from mysql.Then Write it to pgsql. Please guide me.....
You will have to export from mysql and then insert into postgresql. If you are using postgresql 8 or above, you can use dbi-link (http://pgfoundry.org/projects/dbi-link/) to set up a view in your postgresql for the table in mysql and select directly from it. Sean ----- Original Message ----- From: "Mohsen Pahlevanzadeh" <mohsen@pahlevanzadeh.org> To: <pgsql-general@postgresql.org> Cc: <mysql@lists.mysql.com> Sent: Sunday, February 27, 2005 6:27 PM Subject: [GENERAL] Reading from Mysql & writting in PGsql > Dears,I need to read 1 field with select command from mysql.Then Write it > to pgsql. > Please guide me..... > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) >
On Sun, Feb 27, 2005 at 03:27:48PM -0800, Mohsen Pahlevanzadeh wrote: > Dears,I need to read 1 field with select command from mysql. Then > Write it to pgsql. Please guide me..... If you need to do this directly, look into dbi-link. http://pgfoundry.org/projects/dbi-link/ There are conversion tools in contrib: my2pg.pl and mysql2pgsql, and of course you can use the database-independent access in your favorite scripting language (DBI.pm in perl, for example) to attach to both databases, then stream from one to the other. HTH :) Cheers, D -- David Fetter david@fetter.org http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote!