[GENERAL] Is possible to use Prepare/Execute inside a function?

2010-12-15 Thread fel...@informidia.com.br




Hello,
I'm having
problems with a
function
after the postgres
server
has
been upgraded to 8.3.10
(I
used
8.3.7). I did
some testing and
found
some
strange situations.

-- not work
with
the
direct
call function (worked
before
the
upgrade)
select
f_rodar_reportagem(44359, 193097);

-- not
work
with
the call by the
trigger
(a trigger
calls a function
and it calls
f_rodar_reportagem
using
select and worked
before
the
upgrade) 
update
repesportesmt set
   estado = '1'
where idrepesportesmt = 44359;     

-- WORK using Prepare/Execute
prepare rodar(int, int) as select f_rodar_reportagem($1, $2);
execute rodar(44359, 193097);
-

I do
not
understand
why
not
working
after
upgrade,
but
worked with prepare/execute,
so
I tried to use
inside
a function but did
not work.

-- got error in
this line on params
prepare rodar(int,
int) as select f_rodar_reportagem($1, $2); 




-- 





  

  
  Felipe Pamboukian
Analista Programador
Informídia Pesquisas Esportivas Ltda.
Tel./Fax.: 55 11 3673 5566
Email: [email protected]
Web: www.informidia.com.br

  


Antes
de imprimir lembre-se de sua responsabilidade e comprometimento com o
Meio Ambiente





[GENERAL] When the trigger is called my application is awaiting the finish

2010-12-16 Thread fel...@informidia.com.br




Hello, 
I'm
having a problem
running an update
command that invokes
a
trigger, the
problem is that
the
function performed
takes
about
45
minutes to finish
and my application
is
locked
waiting
for the finish. 
You know how
I
can't wait
for
the
end?

Thanks in advance

-- 





  

  
  Felipe Pamboukian
Analista Programador
Informídia Pesquisas Esportivas Ltda.
Tel./Fax.: 55 11 3673 5566
Email: [email protected]
Web: www.informidia.com.br

  


Antes
de imprimir lembre-se de sua responsabilidade e comprometimento com o
Meio Ambiente