Re: Proposal: TABLE functions - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: Proposal: TABLE functions
Date
Msg-id BAY114-F385390560C897143BEBF04F99C0@phx.gbl
Whole thread Raw
In response to Re: Proposal: TABLE functions  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> >> I thought you said this was just syntactic sugar for capabilities we
> >> already had?
>
> > My mistake. I am sorry. I have to store somewhere flag. One bit, which
> > signalise "don't use OUT arguments as function's parameters".
>
>Huh?  What exactly is the meaning of the arguments then?
>
>It sounds to me like this might be better thought of as a new
>proargmode value, but I'm quite unsure what you're talking about ...
>

My basic idea was:

CREATE FUNCTION aaa(IN a1, OUT a, OUT b)
RETURNS SETOF RECORD AS $$
..

is similar
CREATE FUNCTION aaa(IN a1)
RETURNS SETOF RECORD AS $$

from executor perspective there isn't any difference. But PL languages have 
to create only IN variables. It's protection before identifier's name 
colision. With special flag I don't need any changes in executor. And small 
change in PL compile rutines.  Special proargmode can be solution too. I 
don't need new column in pg_proc, but have to modify executor and need more 
changes in output rutines in PL.

I'll go on the way to spec. proargmode. It's good idea.

Thank You
Pavel Stehule

_________________________________________________________________
Emotikony a pozadi programu MSN Messenger ozivi vasi konverzaci. 
http://messenger.msn.cz/



pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: Re: Hierarchical Queries--Status
Next
From: "Jim Nasby"
Date:
Subject: Re: Re-ordering of OR conditions