Is there a way to convert a Postgres dump file to a text file?
I'm experiencing issues getting the dump to the proper file location of I would just restore from the dump file and then export to text.
Here's what lastest.dump looks like:
dumppg-dumppostgresql
Is there a way to convert a Postgres dump file to a text file?
I'm experiencing issues getting the dump to the proper file location of I would just restore from the dump file and then export to text.
Here's what lastest.dump looks like:
Best Answer
This is a dump file produced by
pg_dump -Fc
.To create a text file containing SQL commands from it, use pg_restore.
The basic syntax is
pg_restore file.dump > file.sql
, that is, you don't specify a target database (notice the missing-d
option).