Re: Comparing two PostgreSQL databases -- order of pg_dump output - Mailing list pgsql-hackers

From Jaime Casanova
Subject Re: Comparing two PostgreSQL databases -- order of pg_dump output
Date
Msg-id CAJKUy5gPrgNtRQ214X9umvJJ3FMwxzKQY9K79eppUuXNAJFocw@mail.gmail.com
Whole thread Raw
In response to Comparing two PostgreSQL databases -- order of pg_dump output  (Joe Abbate <jma@freedomcircle.com>)
Responses Re: Comparing two PostgreSQL databases -- order of pg_dump output
List pgsql-hackers
On Tue, Aug 30, 2011 at 2:07 PM, Joe Abbate <jma@freedomcircle.com> wrote:
> Hi,
>
> In order to compare the schema of two presumably identical databases, I've
> been diffing the output of pg_dump -Osx.  However, I've found that the order
> of the output is not very reliable.

what about using pg_dump -Fc -Osx and use pg_restore -l to list
objects. then you can sort and compare objects and then a script that
compare schema of objects extracting them with -P, -T or -t

--
Jaime Casanova         www.2ndQuadrant.com
Professional PostgreSQL: Soporte 24x7 y capacitación


pgsql-hackers by date:

Previous
From: Joe Abbate
Date:
Subject: Comparing two PostgreSQL databases -- order of pg_dump output
Next
From: Tom Lane
Date:
Subject: Re: symbol mismatches on minor version upgrades