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

From: "Henry Combrinck" <henry(at)metroweb(dot)co(dot)za>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Passing RECORD variable from func1() to func2()
Date: 2004-09-06 20:39:54
Message-ID: 15735.165.165.166.163.1094503194.squirrel@airmail.metroweb.co.za
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> "Henry Combrinck" <henry(at)metroweb(dot)co(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-09-06 21:17:55 Re: Passing RECORD variable from func1() to func2()
Previous Message Scott Marlowe 2004-09-06 20:14:47 Re: Indexing Order By columns