Re: Trying to load MySQL data - Mailing list pgsql-general

From Scott Marlowe
Subject Re: Trying to load MySQL data
Date
Msg-id 1168459721.20602.194.camel@state.g2switchworks.com
Whole thread Raw
In response to Trying to load MySQL data  ("garrettmoore@gmail.com" <garrettmoore@gmail.com>)
List pgsql-general
On Tue, 2007-01-09 at 19:54, garrettmoore@gmail.com wrote:
> Hello,
>
> I am working on a project where we are converting from MySQL to
> Postgres. I figured the easiest way would be to export the MySQL data
> as CSV.
>
> I'm having a problem importing some of the data. What I have done is
> exported the MySQL data and then modified it so that all single quotes
> (a ' quote) are doubled, and null values are replaced with an empty
> value in the CSV.
>
> Our data, for example, looks like this:
>
> 2628,'Poster,5,'255.255.18.138',,'[quote=gz]I''m curious, why not allow
> users, then to freely edit topics?[/quote]
> We could either go with "it''s a minor annoyance that is one measure
> that helps keep DB load lower," or "we do it just to piss you off."
> You choose.',0,1124498148,,,376,0,0,,

If that is indeed the line, then this part:

2628,'Poster,5,'255.255.18.138',

is misformed.

I'm assuming you really need:

2628,'Poster',5,'255.255.18.138',

pgsql-general by date:

Previous
From: kmohan
Date:
Subject: Export to shape file
Next
From: Erik Jones
Date:
Subject: Re: How does one perform a case-insenstive query on test