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

From Tom Lane
Subject Re: proposal for 8.3: Simultaneous assignment for PL/pgSQL
Date
Msg-id 12679.1155067509@sss.pgh.pa.us
Whole thread Raw
In response to Re: proposal for 8.3: Simultaneous assignment for PL/pgSQL  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: proposal for 8.3: Simultaneous assignment for PL/pgSQL
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> Pavel Stehule wrote:
>> 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>

> The parentheses are apparently required for multiple variables, so in 
> our case it might look like this:
>   (a,b,c) := foo(bar);

More to the point, a SET keyword is required too by that standard.

I concur with the other comment that plpgql is intended to mimic
Oracle PL/SQL, not SQL/PSM.  If we try to follow two different leads
we are likely to find ourselves with a mess.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Chris Browne
Date:
Subject: Re: 8.2 features status
Next
From: Tom Lane
Date:
Subject: Re: An Idea for planner hints