Re: [HACKERS] tuple return from function

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: jwieck(at)debis(dot)com
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] tuple return from function
Date: 1998-08-13 12:22:57
Message-ID: 199808131222.IAA12098@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> But don't expect
>
> select salary(change_sal('Jan', '1000.00'))
>
> to work. It causes an
>
> ERROR: Tuple is too big: size 200064
>
> Even if you have a function not updating or inserting
> something, the generated querytree causes the function to be
> called twice. So a simple function just doing one select and
> returning a tuple type causes two scans.
>
> What I absolutely don't know is, what is it good for? How is
> the correct syntax to access more than one field from the
> returned tuple?
>
> Shouldn't the call of a function returning a tuple without
> the surrounding attrname(...) have a targetlist too? If so,
> the complete targetlist must be used when building the
> projection tuple, not only the first TLE as it is implemented
> now.
>
> And I think the parser/planner must not generate nested func
> nodes.
>
> I'm really willing to dive into, but should I do it before or
> after 6.4? Doing it before would mean 6.4 NOT AT THE END OF
> THIS MONTH!

I have felt that the 'return set' has only worked in limited cases.
Vadim seems to know there are problems, particularly with free'ing
memory.

My question is whether this relates to the rules system rewrite or the
PL/SQL language module?

--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message D'Arcy J.M. Cain 1998-08-13 12:35:35 Re: [HACKERS] Table permissions problem
Previous Message Bruce Momjian 1998-08-13 11:36:13 Re: [HACKERS] Table permissions problem