[HACKERS] proposal: PLpgSQL parallel assignemnt

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема [HACKERS] proposal: PLpgSQL parallel assignemnt
Дата
Msg-id CAFj8pRAvBRgTWRSPf83z12Xyv0isTf8bjAfeOvYZqLxdH_k5WA@mail.gmail.com
обсуждение исходный текст
Ответы Re: [HACKERS] proposal: PLpgSQL parallel assignemnt  (Craig Ringer <craig@2ndquadrant.com>)
Список pgsql-hackers
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 trivial.

Current state:
==========

CREATE OR REPLACE FUNCTION fx(OUT a int, OUT b int)
AS $$ ...

possibilities of CALL and assignment 

recvar := fx();
rowvar := fx();

SELECT * FROM fx() INTO a, b;

Lua, Golang like proposal:

a, b := fx();

Comments, notes, ideas?

Regards

Pavel

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Rafia Sabih
Дата:
Сообщение: Re: [HACKERS] statement_timeout is not working as expected with postgres_fdw
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: [HACKERS] proposal: PLpgSQL parallel assignemnt