Re: [HACKERS] plperl intial pass

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Mark Hollomon <mhh(at)mindspring(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] plperl intial pass
Date: 1999-07-26 00:28:39
Message-ID: Pine.GSO.3.96.SK.990726042649.4164B-100000@ra
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Great !

at least your examples works:
test=> select hello();
NOTICE: plperl_func_handler: have been asked to call __PLperl_proc_329289
NOTICE: plperl_func_handler: __PLperl_proc_329289 was in the hash
NOTICE: plperl_call_perl_func: calling __PLperl_proc_329289
NOTICE: plperl_func_handler: returned from plperl_call_perl_func
NOTICE: plperl_func_handler: return as string = Hello world!
NOTICE: plperl_func_handler: Datum is 826ee30
hello
------------
Hello world!
(1 row)
test=> create function sum2 (int4, int4) returns int4 as '
test'> $_[0] + $_[1];' language 'plperl';
CREATE
test=> select sum2(4,2);
NOTICE: plperl_func_handler: have been asked to call __PLperl_proc_329290
NOTICE: plperl_func_handler: __PLperl_proc_329290 doesn't exist yet
NOTICE: plperl_create_sub: creating the sub
NOTICE: plperl_call_perl_func: calling __PLperl_proc_329290
NOTICE: plperl_func_handler: returned from plperl_call_perl_func
NOTICE: plperl_func_handler: return as string = 6
NOTICE: plperl_func_handler: Datum is 6
sum2
----
6
(1 row)

Regards,

Oleg
On Sun, 25 Jul 1999, Mark Hollomon wrote:

> Date: Sun, 25 Jul 1999 12:08:51 -0400
> From: Mark Hollomon <mhh(at)mindspring(dot)com>
> To: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
> Cc: pgsql-hackers(at)postgreSQL(dot)org
> Subject: Re: [HACKERS] plperl intial pass
>
> 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(at)mindspring(dot)com
>

_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Vadim Mikheev 1999-07-26 01:55:35 don't lose me :)
Previous Message Hub.Org News Admin 1999-07-25 19:52:26