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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to