Re: pl/perl problem - Mailing list pgsql-general

From FERREIRA William (COFRAMI)
Subject Re: pl/perl problem
Date
Msg-id 1904E3EB39448246A7ECB76DF34A70B00143B498@TOCOMEXC03
Whole thread Raw
In response to pl/perl problem  ("FERREIRA William (COFRAMI)" <william.ferreira@airbus.com>)
Responses Re: pl/perl problem
Re: pl/perl problem
List pgsql-general
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
-----Message d'origine-----
De : Sean Davis [mailto:sdavis2@mail.nih.gov]
Envoyé : lundi 21 mars 2005 16:46
À : FERREIRA William (COFRAMI); pgsql-general@postgresql.org
Objet : Re: [GENERAL] pl/perl problem

 
----- 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?

pgsql-general by date:

Previous
From: "Qingqing Zhou"
Date:
Subject: Re: Measuring Query Performance
Next
From: christine.homer@powerconv.alstom.com
Date:
Subject: Using rule with function for view delete gives error on OLD.* type