On Jun 13, 2005, at 8:45 PM, Tom Lane wrote:
> Either
> psql mydb <batchfile
> or
> psql -f batchfile mydb
>
> ... edit out MySQL-isms, lather rinse repeat ...
>
> I don't know exactly what a MySQL batch file looks like, in particular
> whether they do anything nonstandard for bulk data load. To the extent
> that the file contains reasonably-standard SQL commands, though, it
> should work.
To start you will need to replace any single line comments that start
with '#' to use the SQL standard '--'
You might find some helpful tools here to perform some of the
conversion task:
http://sqlfairy.sourceforge.net/
John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL