Re: Passing RECORD variable from func1() to func2()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Passing RECORD variable from func1() to func2()
Дата
Msg-id 17788.1094495540@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Passing RECORD variable from func1() to func2()  ("Henry Combrinck" <henry@metroweb.co.za>)
Ответы Re: Passing RECORD variable from func1() to func2()  ("Henry Combrinck" <henry@metroweb.co.za>)
Список pgsql-general
"Henry Combrinck" <henry@metroweb.co.za> writes:
> Essentially, I would like to pass a RECORD variable from one function to
> another using plpgsql:

> func2(record)

You can't declare a plpgsql function that accepts RECORD; this is simply
not supportable.  (For one thing, which actual record types should such
a function be considered to match?  It's a nonstarter even at the level
of function argument resolution, let alone the implementation issues.)
It has to take some named rowtype, instead.

There are implementation restrictions in 7.4 and before that prevent
plpgsql functions from passing row or record variables to other
functions, so you'd have problems at the calling end as well.
FWIW these restrictions are fixed for 8.0.

            regards, tom lane

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

Предыдущее
От: "Philippe Lang"
Дата:
Сообщение: Re: RAD with postgreSQL
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: PL-PGSQL language