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