From: Josh Berkus <josh@agliodbs.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Josh Berkus <josh@agliodbs.com>
Cc: Allan Engelhardt <allane@cybaea.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: MEDIAN as custom aggregate?
Date: Mon, 15 Oct 2001 15:44:06 -0700
Message-ID: <web-148453@davinci.ethosmedia.com> (raw)
In-Reply-To: <8803.1002951114@sss.pgh.pa.us>
Tom,
> Um ... does that work? I thought LIMIT was fairly restrictive about
> what it would take as a parameter --- like, constants or $n
> parameters
> only.
>
> I do not know of any median-finding algorithm that doesn't require a
> depressingly large amount of storage...
Me neither. You're right; the query didn't work.
Here's a link to the median-finding function I posted to the CookBook:
http://www.brasileiro.net/postgres/cookbook/view-one-recipe.adp?recipe_id=1654
Anyone who can improve it is welcome!
-Josh
______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh@agliodbs.com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: josh@agliodbs.com, tgl@sss.pgh.pa.us, allane@cybaea.com
Subject: Re: MEDIAN as custom aggregate?
In-Reply-To: <web-148453@davinci.ethosmedia.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox