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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 22:07:26
Message-ID: 28339.1314742046@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Joe Abbate <jma(at)freedomcircle(dot)com> writes:
> 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.

Yeah, we've been around on that before. pg_dump does actually sort the
output items (modulo dependency requirements), but it sorts by the same
"tag" values that are printed by pg_restore -l, and those aren't currently
designed to be unique. It's not too clear if we could get away with
changing the definitions of the tag strings.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-08-30 22:33:49 Re: spinlocks on HP-UX
Previous Message Joe Abbate 2011-08-30 22:04:22 Re: Comparing two PostgreSQL databases -- order of pg_dump output