2

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???

2

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

1 Comment

The separate files are only used for the data, with --schema-only the complete DDL is still compressed into the TOC. (could be possible to extract the parts by applying a script, though)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.