| От | Tom Lane |
|---|---|
| Тема | Re: Plpgsql function with unknown number of args |
| Дата | |
| Msg-id | 26123.1113860525@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Plpgsql function with unknown number of args ("Relyea, Mike" <Mike.Relyea@xerox.com>) |
| Список | pgsql-general |
"Relyea, Mike" <Mike.Relyea@xerox.com> writes:
> Thanks for the input. This looks very promising. I have one further
> question. My SQL statement is going to pull data from more than one
> table in a relatively complex query. How do I cast the RETURNS portion
> of the function?
In current releases, you'll have to create a named composite type that
matches what you want to return, and declare the function as returning
that type.
(PG 8.1 will have a facility for named OUT parameters that lets you
avoid the notational overhead of inventing a composite type, although
what happens under-the-hood is not really very different.)
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера