On Tue, Dec 12, 2006 at 12:22:04PM +0000, Ed Singleton wrote:
> >   I have a script that converts MySQL dump to SQLite. It shouldn't be too
> >hard to adapt it to Postgres. I can publish the script.
> 
> That would be wonderful if you could.  I guess there are similar 
> differences ;)

   It doesn't do anything special. Just fixes quotes. That's enough for a
huge dump (about 300 megabytes sql text files). Postgres could require
more work - to convert date formats, e.g...

#! /bin/bash

echo 'PRAGMA synchronous = OFF;
BEGIN;

' >sqlite-data.sql && \

sed -e s/"\\\\'"/"''"/g -e s/"_\\\\'"/"_\\\\"/g mysql-data.sql >sqlite-data && \

echo 'COMMIT;' >>sqlite-data.sql

   I also manually (with vim macro) inserted

COMMIT;
BEGIN;

   every 1000 lines.

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            [EMAIL PROTECTED]
           Programmers don't die, they just GOSUB without RETURN.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to