Re: Comparing two PostgreSQL databases -- order of pg_dump output

From: Jaime Casanova <jaime(at)2ndquadrant(dot)com>
To: Joe Abbate <jma(at)freedomcircle(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Comparing two PostgreSQL databases -- order of pg_dump output
Date: 2011-08-30 19:24:14
Message-ID: CAJKUy5gPrgNtRQ214X9umvJJ3FMwxzKQY9K79eppUuXNAJFocw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 30, 2011 at 2:07 PM, Joe Abbate <jma(at)freedomcircle(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-08-30 19:31:38 Re: symbol mismatches on minor version upgrades
Previous Message Joe Abbate 2011-08-30 19:07:22 Comparing two PostgreSQL databases -- order of pg_dump output