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

From: Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>, 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-31 20:51:44
Message-ID: e08cc0401001311251q1f0a51bch3e273d90275b9133@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2010/2/1 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com> writes:
>> In other words, the queries can be the same:
>
>> SELECT array_agg(val ORDER BY sk) FROM ...
>> SELECT array_agg(val) WITHIN GROUP (ORDER BY sk) FROM ...
>
> One more time: THOSE DON'T MEAN THE SAME THING.  If we ever get
> around to implementing the hypothetical set functions, we would
> be very unhappy to have introduced such a bogus equivalence.

I completely agree. Although Oracle's syntax can express ordered
aggregate, by introducing such syntax now it will be quite complicated
to implement hypothetical functions for those syntactic restrictions
and design in the future.

Regards,

--
Hitoshi Harada

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message HX Zheng 2010-01-31 21:00:22 contrib\xml2 package's xpath_table function in PostgreSQL
Previous Message Tom Lane 2010-01-31 20:41:23 Re: Re: [COMMITTERS] pgsql: Augment WAL records for btree delete with GetOldestXmin() to