Re: select md5 result set

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Peter Koukoulis <pkoukoulis(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: select md5 result set
Date: 2017-08-03 00:21:26
Message-ID: CAKFQuwbA=o+=KW4Mf5B4G8SJsWJwwKiQcnpDN4UdmbXyY_hkbw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Aug 2, 2017 at 4:50 PM, Peter Koukoulis <pkoukoulis(at)gmail(dot)com>
wrote:

> david, thanks for the help.
>
> Would this be the equivalent, for the statement in your email, for table
> TEST1 (x integer, y varchar(20)):
>
> ft_node=# SELECT md5(string_agg(vals::text, ''))
> ft_node-# from (select x,y from test1) vals(x,y);
> ?
>
>
​The subquery is redundant if you already have a table:

select md5(string_agg(test1::text, '')) from test1;

David J.​

In response to

Browse pgsql-general by date

  From Date Subject
Next Message James Sewell 2017-08-03 00:38:36 Re: Interesting streaming replication issue
Previous Message Alex Samad 2017-08-03 00:12:59 Re: Question about loading up a table