Re: [GENERAL] select md5 result set - Mailing list pgsql-general

From David G. Johnston
Subject Re: [GENERAL] select md5 result set
Date
Msg-id CAKFQuwbA=o+=KW4Mf5B4G8SJsWJwwKiQcnpDN4UdmbXyY_hkbw@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] select md5 result set  (Peter Koukoulis <pkoukoulis@gmail.com>)
List pgsql-general
On Wed, Aug 2, 2017 at 4:50 PM, Peter Koukoulis <pkoukoulis@gmail.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.​

pgsql-general by date:

Previous
From: Alex Samad
Date:
Subject: Re: [GENERAL] Question about loading up a table
Next
From: James Sewell
Date:
Subject: Re: [GENERAL] Interesting streaming replication issue