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-08 15:17:03
Message-ID: BAY20-F25A7389AF975C311CA87F6F9540@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?
>. can the effect be achieved by assigning to a composite?

I looked into SQL2003, and SQL2003 knows it (SQL/PSM):

<assignment statement> ::=
<singleton variable assignment>
| <multiple variable assignment>
<multiple variable assignment> ::=
SET <assignment target list> <equals operator> <assigned row>
<assignment target list> ::=
<left paren> <assignment target> [ { <comma> <assignment target> }... ]
<right paren>
<singleton variable assignment> ::=
SET <assignment target> <equals operator> <assignment source>

Regards
Pavel Stehule

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Dilger 2006-08-08 15:23:05 Re: An Idea for planner hints
Previous Message Zdenek Kotala 2006-08-08 14:51:42 Re: Intermittent "make check" failures on hyena