Array as a parameter in user-defined functions

Поиск
Список
Период
Сортировка
От mila boldareva
Тема Array as a parameter in user-defined functions
Дата
Msg-id 4214596338.20020225144931@dds.nl
обсуждение исходный текст
Ответы Re: Array as a parameter in user-defined functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
Hello!

I have a row in the table which is an array of floats, like, (foo float[8])

I'd like to use a function to perform some operations on that array,
access single elements of that row, like foo[1]+foo[2]. Is it possible
to pass an array to an SQL function as a parameter?

CREATE FUNCTION ADD (float[8], float[8]) RETURNS float AS ' ....

doesn't work. I might try C as well, but, again, how do I pass this float array?

Thanks,
mila
mailto:pierro@dds.nl


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

Предыдущее
От: Jim Lanford
Дата:
Сообщение: help installing psql 7.1.3 - rh6.2 - libreadline.so.4
Следующее
От: denis@coralindia.com
Дата:
Сообщение: create table with PLPGSQL