I've done some searching through the mailing lists and haven't found
any info regarding what I need.
I have an array of values of type int8.
I want to be able to rollup the data and have postgres do all the
summing for me. I've looked at the commands and haven't found what I
need.
Here is what I get:
detailed=# select sum(valuearray) from data where objid=34;
ERROR: Unable to select an aggregate function sum(_int8)
So I decided I would write my own function that I would load into
postgres.
The problem is, how do I access each element in the array?
I can get the array and return it, but in the function I would like to
get each separate value and do the summing, then return the summed
array.
Can anyone help?
Thanks,
Chris