text array accumulate to multidimensional text array

From: "Rainer Zaiss" <r(dot)zaiss(at)free(dot)fr>
To: <pgsql-general(at)postgresql(dot)org>
Subject: text array accumulate to multidimensional text array
Date: 2008-10-14 13:22:47
Message-ID: 7B20CDA1F68841C8A01EA5CDA363C153@geographer
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dear list,

I would like to aggregate a text array into a multidimensional text array.

Let us say I have one table with two collumns

ID ARRAY
A {"A1","B1","C1"}
A {"A2","B2","C2"}
B {"A3","B3","C3"}

If I use a GROUP BY ID, I would like to receive following result:

ID ARRAY
A {{"A1","B1","C1"},{"A2","B2","C2"}}
B {{"A3","B3","C3"}}

I searched around but I didn't find any solution

Thank you for your help

Rainer

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mikkel Høgh 2008-10-14 13:27:30 Re: Drupal and PostgreSQL - performance issues?
Previous Message Sam Mason 2008-10-14 13:08:51 Re: More schema design advice requested