Re: proposal for 8.3: Simultaneous assignment for PL/pgSQL

From: "Pavel Stehule" <pavel(dot)stehule(at)hotmail(dot)com>
To: andrew(at)dunslane(dot)net, tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: proposal for 8.3: Simultaneous assignment for PL/pgSQL
Date: 2006-08-07 14:11:48
Message-ID: BAY20-F81A5372970215FA984CD2F9570@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
>Tom Lane wrote:
> > "Pavel Stehule" <pavel(dot)stehule(at)hotmail(dot)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/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-08-07 14:36:43 Re: proposal for 8.3: Simultaneous assignment for PL/pgSQL
Previous Message Pavel Stehule 2006-08-07 13:57:05 Re: proposal for PL packages for 8.3.