Convert Sqlite SQL, especially as produced by Firefox, into PostgreSQL SQL