I want to convert a PostgreSQL dump file I received to a MYSQL dump file or even sql text to be generated?
If you install the PostgreSQL client programs, you can use "pg_restore" to convert a dump file to a SQL script without having to have a PostgreSQL instance. Just do pg_restore dumpfile.pg
and it will print the restore SQL to stdout.
If you have PostgreSQL installed on your terminal and your file is latest.dump
you just need to convert it to latest.sql
this way:
$ pg_restore latest.dump > latest.sql
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With