Re: return can contains any row or record functions

From: Neil Conway <neilc(at)samurai(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)hotmail(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: return can contains any row or record functions
Date: 2005-11-09 20:57:09
Message-ID: 1131569829.6884.152.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Simon Riggs 2005-11-09 22:24:04 Re: Reducing the overhead of NUMERIC data
Previous Message Tom Lane 2005-11-09 17:52:03 Re: Trivial permission problem with external-projects.sgml / and a typo in postgresql.conf.sample