Re: [GENERAL] example of aggregate function for product

2009-06-25 Thread Albe Laurenz
Whit Armstrong wrote: > I needed to write a product aggregate function, and just happened to > find this example in the nodes to the 8.0 manual: > [...] > > but that example looks pretty different than the ones found in the 8.3 > manual (avg for instance): > [...] > > Are there any experts out

Re: [GENERAL] example of aggregate function for product

2009-06-24 Thread Alvaro Herrera
Whit Armstrong escribió: > Ansis 13 Jan 2006 16:41:05 > An aggregate multiplication function, an analog of "sum" (the same > should be defined also for other numeric types): > > CREATE OR REPLACE FUNCTION mul2(FLOAT,FLOAT) > RETURNS FLOAT AS ' > DECLARE > a ALIAS FOR $1; > b ALIAS FOR $2; [...]

[GENERAL] example of aggregate function for product

2009-06-24 Thread Whit Armstrong
I needed to write a product aggregate function, and just happened to find this example in the nodes to the 8.0 manual: Ansis 13 Jan 2006 16:41:05 An aggregate multiplication function, an analog of "sum" (the same should be defined also for other numeric types): CREATE OR REPLACE FUNCTION mul2(FLO