Re: bug or my ignorance ?

From: Holger Krug <hkrug(at)rationalizer(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: bug or my ignorance ?
Date: 2001-12-11 15:41:11
Message-ID: 20011211164111.A13656@dev12.rationalizer.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Dec 11, 2001 at 10:25:43AM -0500, Tom Lane wrote:
> Holger Krug <hkrug(at)rationalizer(dot)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(at)rationalizer(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-12-11 15:46:12 Re: bug or my ignorance ?
Previous Message Robert J. Sanford, Jr. 2001-12-11 15:33:45 Re: Perf number on a project