Re: proposal for 8.3: Simultaneous assignment for PL/pgSQL - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: proposal for 8.3: Simultaneous assignment for PL/pgSQL
Date
Msg-id BAY20-F2301F636CDDADE6DF46DABF9570@phx.gbl
Whole thread Raw
In response to Re: proposal for 8.3: Simultaneous assignment for PL/pgSQL  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
>
>Martijn van Oosterhout <kleptog@svana.org> writes:
> > Well, you can implement it. After all, the CALL syntax is merely
> > syntactic sugar. You could (if you wanted to) do the following:
>
> > CREATE FUNCTION foo( a TEXT IN, b TEXT INOUT, c TEXT OUT ) as blah...
>
> > And in a pl/pgsql function, translate: "CALL foo(a,b,c)"
> > into "(b,c) = foo(a,b)" internally.
>
>No, Pavel's right: that doesn't work because it's ambiguous.  How do you
>tell whether "CALL foo(a,b,c)" means
>
>    a,b,c := foo();
>    b,c := foo(a);
>    c := foo(a,b);
>    select foo(a,b,c);
>
>There could be functions foo matching all four interpretations.

we can do some hints:

CALL foo(a, OUT b, OUT c)

it's better than nothing

comments?

Regards
Pavel Stehule

_________________________________________________________________
Citite se osamele? Poznejte nekoho vyjmecneho diky Match.com. 
http://www.msn.cz/



pgsql-hackers by date:

Previous
From: "Sander Steffann"
Date:
Subject: Re: pg_upgrade (was: 8.2 features status)
Next
From: Rod Taylor
Date:
Subject: Re: "Constraint exclusion" is not general enough