Re: plperl features - Mailing list pgsql-patches

From Alvaro Herrera
Subject Re: plperl features
Date
Msg-id 20040929162003.GA8007@dcc.uchile.cl
Whole thread Raw
In response to plperl features  (Sergej Sergeev <sergej@commandprompt.com>)
Responses Re: plperl features
Re: plperl features
List pgsql-patches
On Wed, Sep 29, 2004 at 07:13:47PM +0300, Sergej Sergeev wrote:
> Patch provide support for array type and pseudo type
> (anyelement, anyarray) for function parameters and result.
> for example:
>
> CREATE FUNCTION add_three_values(anyelement, anyelement, anyelement)
> RETURNS anyelement AS '
> return $_[0]+$_[1]+$_[2];
> ' LANGUAGE plperl;
>
> CREATE FUNCTION make_array(anyelement, anyelement, anyelement) RETURNS
> anyarray AS '
> return [$_[0], $_[1], $_[2]];
> ' LANGUAGE plperl;
>
> Comments?

What happens if you feed other pseudotypes, like cstring or
language_handler?  Shouldn't that be disallowed or something?

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Java is clearly an example of a money oriented programming"  (A. Stepanov)


pgsql-patches by date:

Previous
From: Sergej Sergeev
Date:
Subject: plperl features
Next
From: Bruce Momjian
Date:
Subject: Re: FAQ translation in farsi