Re: ordered aggregates using WITHIN GROUP (was Re: can somebody execute this query on Oracle 11.2g and send result?)

From: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ordered aggregates using WITHIN GROUP (was Re: can somebody execute this query on Oracle 11.2g and send result?)
Date: 2010-01-29 17:23:06
Message-ID: 36e682921001290923h42d11678l88b87040206e9caa@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 29, 2010 at 12:09 PM, Jonah H. Harris <jonah(dot)harris(at)gmail(dot)com>wrote:

> On Fri, Jan 29, 2010 at 11:57 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
>> I find it doubtful that it's actually necessary in Oracle's version
>> of listagg ...
>>
>
> Eh?
>
>
> http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/functions087.htm
>
> Defines:
>
> *LISTAGG* (measure_expr [, 'delimiter_expr'])
> *WITHIN GROUP* (order_by_clause) [*OVER* query_partition_clause]
>
>
>
SQL Server's listagg is similar to the PG implementation. It seems Oracle
thinks people would prefer to order the list and for that reason, made their
listagg a rank function type. Having done quite a bit of work generating
delimited lists/arrays based on ordering in PG, I generally agree that it's
what I would generally want.

--
Jonah H. Harris

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-01-29 17:23:46 Re: Hot Standby: Relation-specific deferred conflict resolution
Previous Message Jonah H. Harris 2010-01-29 17:09:02 Re: ordered aggregates using WITHIN GROUP (was Re: can somebody execute this query on Oracle 11.2g and send result?)