问题
I'm using Postgres 8.4 and I want to dump database structure (no data). Is is possible to get each object (table, view, function etc.) in a separate file, NOT EVERYTHING in one file???
回答1:
Use newer version of pg_dump (at least version 9.1) and you can dump to a directory using --format=directory
This will create a directory with one file for each table and blob being dumped
来源:https://stackoverflow.com/questions/40281087/how-to-dump-postgresql-database-structure-each-object-in-separate-file