my function is very long but i found an example with the same comportment :
CREATE OR REPLACE FUNCTION adoc.totoTest()
RETURNS int4 AS
$BODY$
my $var = '->>>';
&concat($var);
sub concat {
$var .= 'tagada';
}
elog NOTICE, $var;
return 4;
$BODY$
LANGUAGE 'plperl' VOLATILE;
first execution : ->>>tagada
second execution : ->>>
(for my second problem, i not able to reproduce it....i deleted the source code)
but what means 'use strict' ?
thanks
----- Original Message -----
Sent: Monday, March 21, 2005 9:22 AM
Subject: [GENERAL] pl/perl problem
hi
i wrote a store procedure using the pl/perlU language, and the comportment is strange.
my procedure do a select on my database and some traitments too and write the result in a file;
when i run the procedure a first time, it works fine, the file is create and data are in. but when i run my procedure a second time, the file is create but the data aren't write in it. where is the problem ?
Can you show the function?
i had an other problem the past week, but i not able to reproduce it. it was a very simple funtion who store a string into a variable and display it on the screen : something like this :
my $toto = '->';
$toto.='titi';
elog NOTICE, $toto;
Again, can you show the whole function? And do you 'use strict' when coding?