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-F81A5372970215FA984CD2F9570@phx.gbl
Whole thread Raw
In response to Re: proposal for 8.3: Simultaneous assignment for  (andrew@dunslane.net)
Responses Re: proposal for 8.3: Simultaneous assignment for PL/pgSQL
List pgsql-hackers
>
>Tom Lane wrote:
> > "Pavel Stehule" <pavel.stehule@hotmail.com> writes:
> >> a,b,c := out3fce(1); -- Simultaneous assignment
> >
> > I thought we rejected that idea once already, on the grounds that it
> > would make it too hard to tell the difference between intended code
> > and typos.
> >
>
>In any case, I had some questions:
>
>. is it compatible with PLSQL?

what I know no, but PLSQL has different mechanism for calling procedures. 
And first of all it knows references to variables.

>. can the effect be achieved by assigning to a composite?
>

yes. I can use record type. But here is problem with less readability

The best of is implementation of CALL statement, where I can transmit values 
"by" references. But it's not possible in Postgres :-(. I can't to select 
unambiguously called procedure. "I can, if I accept SQL Server syntax, where 
caller specify OUT, INOUT, IN flags too". I am unhappy with current 
situation, and I search good solution. Simultaneous assignment  is simplest.

Regards
Pavel Stehule

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



pgsql-hackers by date:

Previous
From: "Pavel Stehule"
Date:
Subject: Re: proposal for PL packages for 8.3.
Next
From: Martijn van Oosterhout
Date:
Subject: Re: proposal for 8.3: Simultaneous assignment for PL/pgSQL