Horizontal aggregation?

From: hamann(dot)w(at)t-online(dot)de
To: pgsql-general(at)postgresql(dot)org
Subject: Horizontal aggregation?
Date: 2012-04-14 06:22:56
Message-ID: wolfgang-1120414082256.A0126706@amadeus3.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I am looking for a feature that would select from a table with
k1 a
k1 b
k1 c
k2 a
k3 b
k3 c
something like
k1 a b c
k2 a
k3 b c
(Just all elements next to each other, with a space in between)
or perhaps an array output
k1 {a,b,c]
k2 {a}
k3 {b,c}

If such an operator exists, would there be a "remove duplicates" option?

Regards
Wolfgang Hamann

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Abel Abraham Camarillo Ojeda 2012-04-14 06:28:12 Re: Horizontal aggregation?
Previous Message Tom Lane 2012-04-14 05:09:49 Re: Error with compile source code on CentOS5.7