Re: Passing RECORD variable from func1() to func2() - Mailing list pgsql-general

From Henry Combrinck
Subject Re: Passing RECORD variable from func1() to func2()
Date
Msg-id 15735.165.165.166.163.1094503194.squirrel@airmail.metroweb.co.za
Whole thread Raw
In response to Re: Passing RECORD variable from func1() to func2()  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses 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>)
List 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 by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: Indexing Order By columns
Next
From: Tom Lane
Date:
Subject: Re: Passing RECORD variable from func1() to func2()