Re: Trying to load MySQL data

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: "garrettmoore(at)gmail(dot)com" <garrettmoore(at)gmail(dot)com>
Cc: pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Trying to load MySQL data
Date: 2007-01-10 20:08:41
Message-ID: 1168459721.20602.194.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 2007-01-09 at 19:54, garrettmoore(at)gmail(dot)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',

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Erik Jones 2007-01-10 20:18:17 Re: How does one perform a case-insenstive query on test
Previous Message Scott Marlowe 2007-01-10 19:03:42 Re: Recording insert, updates, and deletes