Re: pl/perl problem

From: "FERREIRA William (COFRAMI)" <william(dot)ferreira(at)airbus(dot)com>
To: 'Sean Davis' <sdavis2(at)mail(dot)nih(dot)gov>, pgsql-general(at)postgresql(dot)org
Subject: Re: pl/perl problem
Date: 2005-03-22 08:13:58
Message-ID: 1904E3EB39448246A7ECB76DF34A70B00143B498@TOCOMEXC03
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)mail(dot)nih(dot)gov]
Envoyé : lundi 21 mars 2005 16:46
À : FERREIRA William (COFRAMI); pgsql-general(at)postgresql(dot)org
Objet : Re: [GENERAL] pl/perl problem

----- Original Message -----
From: FERREIRA William (COFRAMI) <mailto:william(dot)ferreira(at)airbus(dot)com>
To: 'pgsql-general(at)postgresql(dot)org' <mailto:'pgsql-general(at)postgresql(dot)org'>
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?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Qingqing Zhou 2005-03-22 08:25:50 Re: Measuring Query Performance
Previous Message Sim Zacks 2005-03-22 07:00:44 multi line text data/query ?bug?