If I have the output of pg_dump from two different databases, how can I get the difference in structure and contents of all the tables between these two databases?

1 Answer 1


Simplest way would be to dump the schema as plain sql and use text diff.

Or you can use tool like apgdiff which produces ddl statements representing the difference between the two database schemas.


Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.