Re: return can contains any row or record functions - Mailing list pgsql-patches

From Neil Conway
Subject Re: return can contains any row or record functions
Date
Msg-id 1131569829.6884.152.camel@localhost.localdomain
Whole thread Raw
In response to Re: return can contains any row or record functions  ("Pavel Stehule" <pavel.stehule@hotmail.com>)
Responses Re: return can contains any row or record functions  ("Pavel Stehule" <pavel.stehule@hotmail.com>)
List pgsql-patches
On Tue, 2005-08-11 at 08:55 +0100, Pavel Stehule wrote:
> Sorry for my ugly english.

Sorry, I didn't understand your reply.

The problem is this:

- we need to find the TupleDesc of the function's expected return type
for tuple-returning functions

- we can't use estate->rsi for the RETURN case, at least as presently
implemented, because that is not always filled-out -- the example I gave
before shows how because we don't check for a compatible TupleDesc when
estate->rsi is NULL, we end up returning a value that is incompatible
with the function's declared return type

- therefore, we need to use some other way to get the TupleDesc of the
function's declared return type. Offhand I think we can use
estate->fn_rettype (plus the funcapi stuff for handling RECORDOID), but
I haven't had a chance to try it yet.

-Neil



pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Trivial permission problem with external-projects.sgml / and a typo in postgresql.conf.sample
Next
From: "Pavel Stehule"
Date:
Subject: Re: return can contains any row or record functions