Re: [HACKERS] plperl intial pass

Поиск
Список
Период
Сортировка
От Oleg Bartunov
Тема Re: [HACKERS] plperl intial pass
Дата
Msg-id Pine.GSO.3.96.SK.990726042649.4164B-100000@ra
обсуждение исходный текст
Ответ на Re: [HACKERS] plperl intial pass  (Mark Hollomon <mhh@mindspring.com>)
Список 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@mindspring.com>
> To: Oleg Bartunov <oleg@sai.msu.su>
> Cc: pgsql-hackers@postgreSQL.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@mindspring.com
> 

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Mark Hollomon
Дата:
Сообщение: Re: [HACKERS] plperl intial pass
Следующее
От: Vadim Mikheev
Дата:
Сообщение: don't lose me :)