Обсуждение: Testing / debuging data import
Hi All, I am in the process of migrating all my data from MySQL to Postgres. I am getting errors during the data import (non critical), my data is ending up a couple of rows short. This is probably to be expected considering that MySQL doesn't have much respect for data type constaints. Basically what I want to do is simulate a data import (from a file with full insert statements and no table creation), I want the offending record/line to be printed to stdout with a verbose / helpful error. I would preferbly like to use psql from the command line, eg: $ psql [OPTIONS] < data.sql
On Wed, Oct 04, 2006 at 09:03:50AM +0200, Brendon Gleeson wrote: > Basically what I want to do is simulate a data import (from a file with > full insert statements and no table creation), I want the offending > record/line to be printed to stdout with a verbose / helpful error. This doesn't quite meet your requirements, but have you looked at pgloader? http://pgfoundry.org/projects/pgloader/ -- Michael Fuhr
There is this open source tool "mysql2psql" which is bascially a Perl script that can take as an input MySQL dump file and covnert that to a PostgreSQL specific dump file so that you can restore the dump file easily in PostgreSQL.
You can find the tool at --> http://gborg.postgresql.org/project/mysql2psql/projdisplay.php
Thanks,
----
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
You can find the tool at --> http://gborg.postgresql.org/project/mysql2psql/projdisplay.php
Thanks,
----
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
On 10/4/06, Michael Fuhr <mike@fuhr.org > wrote:
On Wed, Oct 04, 2006 at 09:03:50AM +0200, Brendon Gleeson wrote:
> Basically what I want to do is simulate a data import (from a file with
> full insert statements and no table creation), I want the offending
> record/line to be printed to stdout with a verbose / helpful error.
This doesn't quite meet your requirements, but have you looked at
pgloader?
http://pgfoundry.org/projects/pgloader/
--
Michael Fuhr
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster