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

Поиск
Список
Период
Сортировка
От Henry Combrinck
Тема Re: Passing RECORD variable from func1() to func2()
Дата
Msg-id 15735.165.165.166.163.1094503194.squirrel@airmail.metroweb.co.za
обсуждение исходный текст
Ответ на Re: Passing RECORD variable from func1() to func2()  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Passing RECORD variable from func1() to func2()  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Passing RECORD variable from func1() to func2()  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Список 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.

Thanks for the response.

Can you give an example of what a "named rowtype" is?  Are you refering to
creating some kind of custom TYPE, and then passing that to
func2(custom_type_row)?

Thanks
Henry


--------------------------------------------------------
This message was sent using MetroWEB's AirMail service.
http://www.metroweb.co.za/ - full access for only R73.
Free Web Accelerator, WebMail, Calendar, Anti-Virus,
Anti-Spam, 10 emails, 100MB personal webspace, and more!
Phone Now!  086 11 11 440

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

Предыдущее
От: "Scott Marlowe"
Дата:
Сообщение: Re: Indexing Order By columns
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Passing RECORD variable from func1() to func2()