> -----Original Message-----
> From: Jan Wieck [mailto:jwieck@debis.com]
> Sent: Monday, December 14, 1998 6:38 PM
> To: Bruce Momjian
> Cc: Inoue@tpf.co.jp; pgsql-hackers@postgreSQL.org
> Subject: Re: [HACKERS] Projecting attributes of function return values
>
>
> >
> > I have applied this to the CURRENT tree, so the fix will appear in 6.5.
> > I have not applied it to the RELEASE tree, so it will not be in 6.4.1.
> > Not sure there is going to be enough testing for that.
> >
> > Thanks for the patch.
> >
> > >
> > > Hi all
> > >
> > > I have a simple patch about the treatment of functions.
> > > But it may be self-satisfied.
> > > Please check my patch at the end of this posting.
> > >
> > > Case 1. executor evaluates functions twice
> > >
> > > create table a (elem int4);
> > > create function ax2(int4) returns a as
> > > 'select $1*2;' language 'sql';
>
> It addresses a problem I've mentioned some time ago.
> Functions returning sets or complex types have targetlists,
> but these aren't handled correctly in the executor.
>
It includes the fact that func_tlist of Func node is not used to project
attributes of function return values except when functions are written
in 'sql' language ?
and
the fact that PL/pgSQL functions return different type(HeapTuple)
from 'sql' functions which return the pointer to TupleTableSlot node ?
My samples are all written in 'sql' language.
Seems the cases I mentioned are simple bugs.
Thanks.
Hiroshi Inoue
Inoue@tpf.co.jp