plPerl subroutine

Поиск
Список
Период
Сортировка
От FERREIRA William (COFRAMI)
Тема plPerl subroutine
Дата
Msg-id 1904E3EB39448246A7ECB76DF34A70B00143B48A@TOCOMEXC03
обсуждение исходный текст
Ответы Re: plPerl subroutine  (Sean Davis <sdavis2@mail.nih.gov>)
Re: plPerl subroutine  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
hi
 
is it possible to create subroutines with plPerl ?
 
i tried this :
CREATE OR REPLACE FUNCTION adoc.CREATE_XML_FILE(docId int4, eleId int4, evo int4, fileName text, fileRelativeDir text)
  RETURNS int4 AS
$BODY$
 my $theClob='';
 
 my $params = 'select adoc.GET_XML_FRAG('.$_[0].','.$_[1].','.$_[2].',\''.$theClob.'\','.0;
 $params = $params.')';
 
 $theClob =  spi_exec_query($params);
 elog NOTICE, $theClob;
 
 return 4;
$BODY$
  LANGUAGE 'plperl' VOLATILE;
 
CREATE OR REPLACE FUNCTION adoc.GET_XML_FRAG(docId int4, eleId int4, evo int4, clob text, indx int4)
  RETURNS text AS
$BODY$
 my $t_clob = $_[3].'totototototototototot';
 
 return $t_clob;
$BODY$
  LANGUAGE 'plperl' VOLATILE;
but the CREATE_XML_FILE doesn't display 'totototototototototot' but HASH(0xf03fa4)....
 
is it possible with this solution or does i need to create a module (including makefile, .pm, ...) ?
if i must create a module, can you explain how to do ?
 
thanks

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

Предыдущее
От: Jason Tesser
Дата:
Сообщение: Re: 2 questions about types
Следующее
От: Doug McNaught
Дата:
Сообщение: Re: prelimiary performance comparison pgsql vs mysql