Re: [HACKERS] plperl intial pass

Mark Hollomon <mhh@mindspring.com>

From: Mark Hollomon <mhh@mindspring.com>
To: Oleg Bartunov <oleg@sai.msu.su>
Cc: pgsql-hackers@postgresql.org
Date: 1999-07-25T16:08:51Z
Lists: pgsql-hackers
On Sat, Jul 24, 1999 at 10:26:33PM +0400, Oleg Bartunov wrote:
> Great,
> 
> just compiled and install but need to look at some examples :-)
> btw, here is a patch for createlang command to enable plperl
> I'm not sure about trusted field.

At this point it definitely should not be trusted. (Trust me).

How about the famous hello world:

create function hello () returns text as '
return "Hello world!";' language 'plperl';

or a quick sum:

create function sum2 (int4, int4) returns int4 as '
$_[0] + $_[1];' language 'plperl';

The args are in @_ (naturally). Tuples are passed as
hash references.

Access to SPI functionality is coming.



-- 
Mark Hollomon
mhh@mindspring.com