proposal: plpgsql, solution for derivated types of parameters

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: proposal: plpgsql, solution for derivated types of parameters
Date: 2010-10-08 06:08:39
Message-ID: AANLkTikX6AuO_DH+HikDv=7_TMz4Va1iZRDhWq=VpLUE@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2010-10-08 06:09:26 Re: Git cvsserver serious issue
Previous Message Fujii Masao 2010-10-08 05:52:09 Re: Issues with Quorum Commit