The following bug has been logged online:
Bug reference: 4916
Logged by: Richard Neill
Email address: rn214@cam.ac.uk
PostgreSQL version: 8.4
Operating system: Linux
Description: wish: more statistical functions (median, percentiles
etc)
Details:
In addition to the existing aggregate functions (avg, stddev etc), it would
be nice if postgres could return further information. For example, the
quartiles, percentiles, and median.
[mode would also be useful, as an explicit function, though we can get it
easily enough using count(1) order by count desc].
According to google, this has been a wish since at least year 2000 for
various people, but doesn't seem to be implemented.
Thanks - Richard