plpgsql: support identif%TYPE[], (from ToDo)

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: plpgsql: support identif%TYPE[], (from ToDo)
Date: 2009-07-28 20:53:08
Message-ID: 162867790907281353q65ac87fx205029b224353b03@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello

I would to solve some points from ToDo. I began with TYPE [] support.
I thing, so this should be relative simple, but there are one issue.

There are syntax for declare array from scalar type -

create or replace function x(a int)
returns ... as $$
declare f a%type[] <--
begin ...

but there are not syntax for inversion - scalar from array.
Theoretically we could to define variable with same type (array) and
everywhere work with first element. Or we should to define some
syntax:

My first idea is using word element:

create or replace function x(a int[])
...
declare f a%element;
begin
...

any ideas?

regards
Pavel

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Euler Taveira de Oliveira 2009-07-28 21:08:15 Re: WIP: to_char, support for EEEE format
Previous Message pgsql 2009-07-28 20:30:23 Re: xpath not a good replacement for xpath_string