How do I convert a binary pgdump (compressed) to a plain SQL file?

pg_restore, when run without a database name, outputs a text dump to stdout; you can send that elsewhere with -f or with I/O redirection.

pg_restore -f mydatabase.sql mydatabase.dump 

Note that you must ensure there’s no PGDATABASE environment variable set, or it’ll try to connect to that database.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)