deferencing array of int8

Поиск
Список
Период
Сортировка
От Christopher Yap
Тема deferencing array of int8
Дата
Msg-id EXECMAIL.1010716170355.D8272@lmeride9.linmor.com
обсуждение исходный текст
Список pgsql-hackers
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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Phillip F Jansen
Дата:
Сообщение: Re: PGSQL problem with weblogic and OID data type
Следующее
От: "Jon Folland"
Дата:
Сообщение: RE: JDBC Support - prepared Statements?