Re: [HACKERS] Projecting attributes of function return values - Mailing list pgsql-hackers

From jwieck@debis.com (Jan Wieck)
Subject Re: [HACKERS] Projecting attributes of function return values
Date
Msg-id m0zpUS2-000EBQC@orion.SAPserv.Hamburg.dsh.de
Whole thread Raw
In response to Re: [HACKERS] Projecting attributes of function return values  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses RE: [HACKERS] Projecting attributes of function return values  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
List pgsql-hackers
>
> 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.

    Me and Thomas G. Lockhard where discussing another rangetable
    entry type lately, which is in fact a subselect.  That  might
    cover this problem more completely in the future.

    So pls let it out of the REL6_4 tree for now.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#======================================== jwieck@debis.com (Jan Wieck) #

pgsql-hackers by date:

Previous
From: jwieck@debis.com (Jan Wieck)
Date:
Subject: Re: [HACKERS] Bug report: PL/pgSQL and mixed case table/field names.
Next
From: Keith Parks
Date:
Subject: Backend crash in opr_sanity regression test.