Re: AGREGATE FUNCTIONS

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Roberto Rezende de Assis <rezende_assis(at)yahoo(dot)com(dot)br>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: AGREGATE FUNCTIONS
Date: 2006-06-06 17:03:13
Message-ID: Pine.OSF.4.61.0606062000210.243169@kosh.hut.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 6 Jun 2006, Roberto Rezende de Assis wrote:

> Hello, I would like to know where in the source-code of postgres is located
> the code of the aggregate functions min, max, avg.

They're in src/backend/utils/adt/numeric.c

> I wish to develop more statistical aggregate functions, and I prefer to use C
> than to write then in the PL/R.

Make sure you read section "32.10 User-Defined aggregates" in the manual:

http://www.postgresql.org/docs/current/interactive/xaggr.html

Also, take a look at contrib/intagg for another example.

- Heikki

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2006-06-06 17:16:57 Re: AGREGATE FUNCTIONS
Previous Message Travis Cross 2006-06-06 17:02:07 Re: Duplicate rows sneaking in despite PRIMARY KEY / UNIQUE