| От | Bo Lorentsen |
|---|---|
| Тема | accumulate setof ? |
| Дата | |
| Msg-id | 3B9DC0B5.BAD49964@netgroup.dk обсуждение исходный текст |
| Ответы |
Re: accumulate setof ?
|
| Список | pgsql-novice |
I have tried to make a plgpsql function that accumulate a set of integers, but I find no way of doing this in the PostgreSQL documentation. I have made a very simple example to demonstrate my problem :
CREATE FUNCTION fn_integer_list( INTEGER )
RETURNS SETOF INTEGER AS '
DECLARE
SETOF INTEGER res;
BEGIN
res := 1;
res := res + $1;
RETURN res;
END'
LANGUAGE 'plpgsql';
There is really two problems here. How does one initialize a set of integers, and how does one append a new value to the setof integers ? This example does, of course, not work :-)
If there is a reference to some documentation I should read, I will be happy for any hint in its direction.
/BL
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера