Re: md5 of table - Mailing list pgsql-general

From Vincent de Phily
Subject Re: md5 of table
Date
Msg-id 1392280.Ab7exAELjk@moltowork
Whole thread Raw
In response to md5 of table  (Sim Zacks <sim@compulab.co.il>)
List pgsql-general
On Thursday 01 September 2011 11:47:24 Sim Zacks wrote:
> Is there a way to get an md5 or other hash of an entire table?
>
> I want to be able to easily compare 2 tables in different databases.
>
> I thought about using dblink and the EXCEPT query, but then I need to
> know the field list of each query result, which is a pain in the butt.
>
> If I could return an md5 of the entire table, then I could check if the
> tables have the same hash and be confident enough that the tables were
> identical.
>
>
> Thanks
> Sim

You might also want to take a look at

http://pgfoundry.org/projects/pg-comparator/

which can give a more nuanced view of db differences and tries to be smart
about performance. It looks a bit stale; I haven't used it in ages, but it
used to be a trusty part of our test suite.
--
Vincent de Phily

pgsql-general by date:

Previous
From: gbrun
Date:
Subject: Missing DLL after unplaned server stop
Next
From: Rory Campbell-Lange
Date:
Subject: Re: UPDATE using query; per-row function calling problem