On Tue, Dec 11, 2001 at 10:25:43AM -0500, Tom Lane wrote:
> Holger Krug <hkrug@rationalizer.com> writes:
> > =>select name(r.a) from (select testfun() as a) as r;
> > ERROR: fmgr_info: function 137857576: cache lookup failed
>
> Works okay if you just do
>
> regression=# select name(testfun());
> name
> -----------
> your name
> (1 row)
Thank you. Unfortunately this does not work, if I have to return several
attributes of T to the client.
Is there any other clean way to solve this problem:
"Having a function returning a tuple return the whole tuple to the client."
Not so clean ways would be:
* to work with an intermediate representation of the tuple as a string
(as Joe Conway did in a former version of dblink) or
* to put the function result into a temporary table which is
created for this purpose.
Which way is the recommended one ?
> I've been meaning to rip it out and try to
> set up a somewhat-sensible implementation of functions returning tuples.
Would be fine.
Thank you for your help !
--
Holger Krug
hkrug@rationalizer.com