Order By for aggregate functions (Simulating Group_concat)

From: Charlotte Pollock <c(dot)pollock(at)bangor(dot)ac(dot)uk>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Order By for aggregate functions (Simulating Group_concat)
Date: 2005-09-01 09:04:12
Message-ID: BF3C829C.8B6D%c.pollock@bangor.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi All

I'm trying to create a aggregate function similar 9but not identical) to
mysql's group_concat.

What I want to be able to do is pass and order by field to the aggregate so
I can be certain I get the list of strings in the correct order.

Does anyone have any ideas how this could be done? In a previous thread on
aggregates a couple of people said that they thought it was doable but
nobody hinted at how.

Thanks in advance

Charlotte Pollock

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2005-09-01 10:08:06 Re: Problem running or executing a function in Postgresql
Previous Message David Sankel 2005-09-01 08:52:55 Re: Removing all users from a group