On Thu, Jul 24, 2014 at 03:06:28PM +0100, matt@byrney.com wrote:
> > select md5(string_agg(md5(c::text), '' order by md5(c::text))) from
> > pg_class c;
> >
> > (of course you can do it on any table, not only pg_class).
> >
> > If you want to use the xor idea (which make sense), all you need is to
> > write xor aggregate.
>
> This is nice and neat but there are some major disadvantages with this
> approach:
>
> 1. It can't detect differences in types, e.g. converting an INT column to
> TEXT will leave the checksum unchanged.
Unless you apply it to pg_attribute, no ?
Karsten
--
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346