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)
In the other case it's getting confused by provisions left over from the
ancient PostQUEL "set attribute" feature. AFAICT that feature is
completely broken nowadays. I've been meaning to rip it out and try to
set up a somewhat-sensible implementation of functions returning tuples.
regards, tom lane