| От | Tom Lane |
|---|---|
| Тема | Re: Returning a set from an function |
| Дата | |
| Msg-id | 28752.1144532786@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Returning a set from an function ("Keith Hutchison" <keith.kjtl.hutchison@gmail.com>) |
| Список | pgsql-sql |
"Keith Hutchison" <keith.kjtl.hutchison@gmail.com> writes: > Looking for an example showing how to return a set from either a sql > function or a plpsqq function. Try "SQL Functions Returning Sets" here: http://www.postgresql.org/docs/8.1/static/xfunc-sql.html In plpgsql you just "RETURN NEXT" each value (typically this would be inside a loop, though it doesn't have to be) and then either RETURN with no argument or fall off the end of the function (I think the latter is only allowed as of PG 8.1). There don't seem to be any very compelling examples in the manual, but I bet you can find some at techdocs.postgresql.org. regards, tom lane
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера