proposal: plpgsql, solution for derivated types of parameters - Mailing list pgsql-hackers

From Pavel Stehule
Subject proposal: plpgsql, solution for derivated types of parameters
Date
Msg-id AANLkTikX6AuO_DH+HikDv=7_TMz4Va1iZRDhWq=VpLUE@mail.gmail.com
Whole thread Raw
Responses Re: proposal: plpgsql, solution for derivated types of parameters
Re: proposal: plpgsql, solution for derivated types of parameters
List 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 by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Issues with Quorum Commit
Next
From: Magnus Hagander
Date:
Subject: Re: Git cvsserver serious issue