Re: [HACKERS] proposal: PLpgSQL parallel assignemnt

2017-06-02 Thread Pavel Stehule
2017-06-02 19:05 GMT+02:00 Pavel Stehule : > > > 2017-06-02 10:15 GMT+02:00 Pavel Stehule : > >> >> >> 2017-06-02 10:06 GMT+02:00 Craig Ringer : >> >>> On 2 June 2017 at 15:51, Pavel Stehule wrote: >>> >>> > a, b := fx(); >>> > >>> > Comments, notes, ideas? >>> >>> I'd be pretty happy to have >>>

Re: [HACKERS] proposal: PLpgSQL parallel assignemnt

2017-06-02 Thread Pavel Stehule
2017-06-02 10:15 GMT+02:00 Pavel Stehule : > > > 2017-06-02 10:06 GMT+02:00 Craig Ringer : > >> On 2 June 2017 at 15:51, Pavel Stehule wrote: >> >> > a, b := fx(); >> > >> > Comments, notes, ideas? >> >> I'd be pretty happy to have >> >> (a, b) = (x, y); >> (a, b) = f(x); >> >> which is SQL-esque

Re: [HACKERS] proposal: PLpgSQL parallel assignemnt

2017-06-02 Thread Pavel Stehule
2017-06-02 10:06 GMT+02:00 Craig Ringer : > On 2 June 2017 at 15:51, Pavel Stehule wrote: > > > a, b := fx(); > > > > Comments, notes, ideas? > > I'd be pretty happy to have > > (a, b) = (x, y); > (a, b) = f(x); > > which is SQL-esque. > This is not too far to my proposal - and it is fully adequ

Re: [HACKERS] proposal: PLpgSQL parallel assignemnt

2017-06-02 Thread Craig Ringer
On 2 June 2017 at 15:51, Pavel Stehule wrote: > a, b := fx(); > > Comments, notes, ideas? I'd be pretty happy to have (a, b) = (x, y); (a, b) = f(x); which is SQL-esque. But what, if anything, does Ada do? -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Developmen

[HACKERS] proposal: PLpgSQL parallel assignemnt

2017-06-02 Thread Pavel Stehule
Hi Some modern or old languages (GO, Lua, CLU) has similarly designed function OUT parameters like PLpgSQL. In these languages is usually supported parallel assignment. It is not supported by PLpgSQL - there is workaround - using SELECT FROM, but it is workaround. The implementation of PA is triv