Re: requesting features in PostgreSQL

From: Andrew Gould <andrewgould(at)yahoo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Postgres Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: requesting features in PostgreSQL
Date: 2002-04-26 16:49:29
Message-ID: 20020426164929.8716.qmail@web13407.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

One request is certainly not sufficient for a new
standard feature. As I see more industries becoming
data savvy, however, I think it's time will come.
Until then....

Simple python scripts are the extent of my coding
experience. As I will be processing 2 to 6 million
records within one query, I guess I should learn some
C.

Once I untar PostgreSQL's source, where can I find the
code for avg()? Will it have it's own file?

Thanks,

Andrew

--- Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Andrew Gould <andrewgould(at)yahoo(dot)com> writes:
> > I need an aggregate function that calculates
> geometric
> > mean, and can be used in SQL statements the same
> as
> > any other aggregate function such as count(),
> sum()
> > and avg(). Rather than have a custom function,
> I'd
> > like to see it added as a standard PostgreSQL
> feature.
>
> One request does not strike me as sufficient reason
> to make it a
> standard feature. Extensibility is what Postgres is
> all about
> --- so go ahead and write your own.
>
> AFAICS this should take about ten minutes to
> prototype (two simple
> plpgsql or pltcl functions and a user-defined
> aggregate). If you intend
> to process very large volumes of data, it might be
> worth rewriting the
> transition function in C for speed. (You could
> steal the existing
> transition function for avg() as a model.)
>
> regards, tom lane
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the
> unregister command
> (send "unregister YourEmailAddressHere" to
majordomo(at)postgresql(dot)org)

__________________________________________________
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more
http://games.yahoo.com/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-04-26 18:30:03 Re: requesting features in PostgreSQL
Previous Message Neil Conway 2002-04-26 16:47:46 Re: bit datatype in 7.2.1