Re: idea - new aggregates median, listagg - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: idea - new aggregates median, listagg
Date
Msg-id 4B28A59C020000250002D5EB@gw.wicourts.gov
Whole thread Raw
In response to Re: idea - new aggregates median, listagg  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
Pavel Stehule <pavel.stehule@gmail.com> wrote:
> 2009/12/15 David Fetter <david@fetter.org>:
>> http://www.simple-talk.com/sql/t-sql-programming/median-workbench/
> 
> In this article the are two medians - statistical and financial. I
> am for both. But only one can be named "median".
Well, since the statistical median requires that you specify whether
you want the left or right median (in case there are an even number
of values), you could either have two median functions, one of which
would take an extra parameter for this, or you could have median,
left_median, and right_median functions.
-Kevin


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Patch: Remove gcc dependency in definition of inline functions
Next
From: Marko Kreen
Date:
Subject: Re: Patch: Remove gcc dependency in definition of inline functions