Re: proposal: plpgsql, solution for derivated types of parameters

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: proposal: plpgsql, solution for derivated types of parameters
Дата
Msg-id 21663.1286546127@sss.pgh.pa.us
обсуждение исходный текст
Ответ на proposal: plpgsql, solution for derivated types of parameters  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: proposal: plpgsql, solution for derivated types of parameters  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
Pavel Stehule <pavel.stehule@gmail.com> writes:
> 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 haven't seen any actual field complaints that would be solved by this.
How often is it really going to be useful?

> DECLARE elementvar IS ELEMENT OF arrayvar;
> DECLARE arrayvar IS ARRAY OF varname;

Both of these notations seem pretty inconsistent with the rest of
plpgsql, as well as being dead ends when you think about extensions to
more complex situations like arrays of records or records of arrays.
I'd expect to do the former with something like "arrayvar[0]%type" and
the latter with "var%type[]".  Possibly some parentheses would be needed
to make this non-ambiguous.
        regards, tom lane


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

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: Issues with Quorum Commit
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Issues with Quorum Commit