proposal: plpgsql, solution for derivated types of parameters

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема proposal: plpgsql, solution for derivated types of parameters
Дата
Msg-id AANLkTikX6AuO_DH+HikDv=7_TMz4Va1iZRDhWq=VpLUE@mail.gmail.com
обсуждение исходный текст
Ответы Re: proposal: plpgsql, solution for derivated types of parameters  (Itagaki Takahiro <itagaki.takahiro@gmail.com>)
Re: proposal: plpgsql, solution for derivated types of parameters  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hello,

the current plpgsql syntax doesn't offer a functionality to define
some variable with type as element of some other array variable or
reverse order. The primary goal of this proposal is enahancing plpgsql
for better working with polymorphic types.

I propose a following syntax:

-- variable as element of some array
DECLARE elementvar IS ELEMENT OF arrayvar;
DECLARE elementvar IS ELEMENT OF arrayvar%type

-- variable as array of some variable
DECLARE arrayvar IS ARRAY OF varname;
DECLARE arrayvar IS ARRAY OF varname%type

This proposal doesn't introduce any new reserved keywords.

Comments?

Regards

Pavel Stehule


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

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: Issues with Quorum Commit
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: Git cvsserver serious issue