Re: string_agg delimiter having no effect with order by - Mailing list pgsql-bugs

From Thom Brown
Subject Re: string_agg delimiter having no effect with order by
Date
Msg-id AANLkTik7Nc=ei-LvA2MXeYUXSduGskOmGqCPfO99MDwK@mail.gmail.com
Whole thread Raw
In response to Re: string_agg delimiter having no effect with order by  (Greg Stark <gsstark@mit.edu>)
Responses Re: string_agg delimiter having no effect with order by  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On 5 August 2010 10:29, Greg Stark <gsstark@mit.edu> wrote:
> On Thu, Aug 5, 2010 at 5:18 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
>> The same problem can be with custom aggregates :( so this syntax isn't
>> too robust. We can support Oracle's syntax in future releases, where
>> syntax divide aggregate call and ORDER BY clause.
>>
>
> What syntax is that?
>
> --
> greg
>

An example I've found is:

SELECT deptno, LISTAGG(ename, ',') WITHIN GROUP (ORDER BY ename) AS employees
FROM   emp
GROUP BY deptno;

--
Thom Brown
Registered Linux user: #516935

pgsql-bugs by date:

Previous
From: Greg Stark
Date:
Subject: Re: string_agg delimiter having no effect with order by
Next
From: seol-dongin@hti.hitachi-hitec.com
Date:
Subject: My computer shut down automatically