Received: from clio.trends.ca (root@clio.trends.ca [209.47.148.2]) by hub.org (8.10.1/8.10.1) with ESMTP id e5C9qaT39455 for ; Mon, 12 Jun 2000 05:52:36 -0400 (EDT) Received: from downtown.oche.de (downtown.oche.de [194.94.253.3]) by clio.trends.ca (8.9.3+Sun/8.9.3) with ESMTP id FAA27922 for ; Mon, 12 Jun 2000 05:09:32 -0400 (EDT) Received: (from uucp@localhost) by downtown.oche.de (8.9.3/8.9.3/Debian/GNU) with UUCP id LAA08861 for pgsql-admin@postgresql.org; Mon, 12 Jun 2000 11:10:00 +0200 Received: from localhost (localhost [[UNIX: localhost]]) by linux.home.de (8.9.3/8.8.7) id KAA16382 for pgsql-admin@postgresql.org; Mon, 12 Jun 2000 10:07:32 +0200 From: Dirk Heinrichs To: pgsql-admin@postgresql.org Subject: Re: Importing table from mysql Date: Mon, 12 Jun 2000 10:05:17 +0200 X-Mailer: KMail [version 1.0.29] Content-Type: text/plain References: <3.0.5.32.20000602173124.0081d470@fmol.5sigcmd.army.mil> In-Reply-To: <3.0.5.32.20000602173124.0081d470@fmol.5sigcmd.army.mil> MIME-Version: 1.0 Message-Id: <00061210073100.16281@linux> Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by hub.org id e5C9qaT39480 X-Archive-Number: 200006/75 On Fre, 02 Jun 2000, Anthony E. Greene wrote: >At 11:17 2000-06-02 +0530, Pragati Sagar wrote: >>I already have a database created in mysql. But now I want to shift from >>mysql to postgresql but my problem is how to convert mysql database to >>postgresql. How will I import the tables from mysql? Please help me with >>this as I have not been able to find any diocumentaion on the net. > >Does mysql have a command analogous to pg_dump? If you could get all the >data out and include the SQL commands it takes to recreate the database, >that would be best. > >Alternatively, you export the data into tab or comma-delimited text files >and use the \copy command in psql to import it into existing tables. You could also write a perl script, that fetches the data from the mysql db and inserts it into the psql db using DBI. Bye... Dirk