Re: md5 of table - Mailing list pgsql-general

From Sim Zacks
Subject Re: md5 of table
Date
Msg-id 4E5F5AF3.5060708@compulab.co.il
Whole thread Raw
In response to md5 of table  (Sim Zacks <sim@compulab.co.il>)
Responses Re: md5 of table  (Grzegorz Jaśkiewicz <gryzman@gmail.com>)
List pgsql-general
On 09/01/2011 12:26 PM, Pavel Stehule wrote:
> Hello
>
> postgres=# create table tt(a int, b varchar);
> CREATE TABLE
> postgres=# insert into tt values(10,'hello');
> INSERT 0 1
>
> postgres=# select md5(array_to_string(array_agg(md5(tt::text)),'')) from tt;
>                 md5
> ----------------------------------
>   20a92a676f52699e613da1bb114bd6f0
> (1 row)
>
> Regards
>
> Pavel Stehule
Would be perfect, but 8.2 can't cast a UDT to text.
ERROR:  cannot cast type tt to text
LINE 1: select tt::text from tt

Thanks
Sim

pgsql-general by date:

Previous
From: Achilleas Mantzios
Date:
Subject: Re: md5 of table
Next
From: Grzegorz Jaśkiewicz
Date:
Subject: Re: md5 of table