Re: Plpgsql function with unknown number of args

Поиск
Список
Период
Сортировка
От 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: PostgreSQL as a filesystem
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_dump fails