Re: wip: functions median and percentile

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: wip: functions median and percentile
Дата
Msg-id AANLkTim24-NmkrqrYmeovgAAqC4fqJsHJ9QY-1cuenFG@mail.gmail.com
обсуждение исходный текст
Ответ на Re: wip: functions median and percentile  (Greg Stark <gsstark@mit.edu>)
Ответы Re: wip: functions median and percentile  (Hitoshi Harada <umi.tanuki@gmail.com>)
Re: wip: functions median and percentile  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Hello

2010/10/11 Greg Stark <gsstark@mit.edu>:
> On Sun, Oct 10, 2010 at 2:16 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> It was pointed out upthread that while median isn't presently
>> in the standard, Oracle defines it in terms of percentile_cont(0.5)
>> which *is* in the standard.
>
> Uhmm, then why don't we implement that? We could provide median() as a
> short-cut but percentile_cont() doesn't sound much harder to implement
> than median() and more general.

The problem is in interface. The original patch did it, but I removed
it. We cannot to unsure immutability of some parameters now. Can we
enhance a AGGREGATE to allow some mark like IMMUTABLE parameter and
probably we should to support ANSI syntax:

PERCENTILE_CONT ( expression1 )
WITHIN GROUP ( ORDER BY expression2 [ ASC | DESC ] )

This syntax allows to divide a muttable and immutable parameters.

Regards

Pavel Stehule
>
> --
> greg
>


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: host name support in pg_hba.conf
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Issues with two-server Synch Rep