Обсуждение: data statistic functions

Поиск
Список
Период
Сортировка

data statistic functions

От
Kevin Hunter
Дата:
Hullo List,

What does Postgres offer in terms of statistics support (not the
statistics about the database, but functions to operate on the data).

I know there are simple things like AVG, COUNT, MAX, and MIN, but what else?

I'm not sure where to begin looking, other than a cursory inspection of
http://www.postgresql.org/docs/8.3/static/functions.html . . .

On a side note, I also noted that I couldn't immediately spot AVG, MAX,
or MIN in the output of \df.

Thanks,

Kevin

Re: data statistic functions

От
"Joshua D. Drake"
Дата:
On Tue, 23 Oct 2007 16:43:04 -0400
Kevin Hunter <hunteke@earlham.edu> wrote:

> Hullo List,
>
> What does Postgres offer in terms of statistics support (not the
> statistics about the database, but functions to operate on the data).
>
> I know there are simple things like AVG, COUNT, MAX, and MIN, but
> what else?
>
> I'm not sure where to begin looking, other than a cursory inspection
> of http://www.postgresql.org/docs/8.3/static/functions.html . . .
>
> On a side note, I also noted that I couldn't immediately spot AVG,
> MAX, or MIN in the output of \df.

http://www.postgresql.org/docs/8.2/static/functions-aggregate.html

Sincerely,

Joshua D. Drake



>
> Thanks,
>
> Kevin
>
> ---------------------------(end of
> broadcast)--------------------------- TIP 2: Don't 'kill -9' the
> postmaster
>


--

      === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564   24x7/Emergency: +1.800.492.2240
PostgreSQL solutions since 1997  http://www.commandprompt.com/
            UNIQUE NOT NULL
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/


Вложения

Re: data statistic functions

От
Steve Atkins
Дата:
On Oct 23, 2007, at 1:43 PM, Kevin Hunter wrote:

> Hullo List,
>
> What does Postgres offer in terms of statistics support (not the
> statistics about the database, but functions to operate on the data).
>
> I know there are simple things like AVG, COUNT, MAX, and MIN, but
> what else?
>
> I'm not sure where to begin looking, other than a cursory
> inspection of
> http://www.postgresql.org/docs/8.3/static/functions.html . . .

Take a look under "Aggregate Functions" ( http://www.postgresql.org/
docs/8.3/static/functions-aggregate.html ). There's probably some
interesting stuff if you look at PL/R too ( http://pgfoundry.org/
projects/plr/ ).

Cheers,
   Steve




Re: data statistic functions

От
Kevin Hunter
Дата:
At 4:53p -0400 on 23 Oct 2007, Steve Atkins wrote:
> There's probably some interesting stuff if you look at PL/R too (
> http://pgfoundry.org/projects/plr/ ).

PL/R . . . that looks promising.  Thanks.

Kevin

Re: data statistic functions

От
Tom Lane
Дата:
Kevin Hunter <hunteke@earlham.edu> writes:
> On a side note, I also noted that I couldn't immediately spot AVG, MAX,
> or MIN in the output of \df.

\df explicitly excludes aggregate functions.  Try \da.

            regards, tom lane