Search Postgresql Archives

Is possible to use Prepare/Execute inside a function?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: felipe@xxxxxxxxxxxxxxxxx
Web: www.informidia.com.br
Antes de imprimir lembre-se de sua responsabilidade e comprometimento com o Meio Ambiente

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux