Re: Table checksum proposal

Поиск
Список
Период
Сортировка
От Karsten Hilbert
Тема Re: Table checksum proposal
Дата
Msg-id 20140724202805.GD3996@hermes.hilbert.loc
обсуждение исходный текст
Ответ на Re: Table checksum proposal  (matt@byrney.com)
Список pgsql-general
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


В списке pgsql-general по дате отправления:

Предыдущее
От: Karsten Hilbert
Дата:
Сообщение: Re: Table checksum proposal
Следующее
От: Mike Christensen
Дата:
Сообщение: Regular expression question with Postgres