From: | "felipe(at)informidia(dot)com(dot)br" <felipe(at)informidia(dot)com(dot)br> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Is possible to use Prepare/Execute inside a function? |
Date: | 2010-12-15 17:10:53 |
Message-ID: | 4D08F69D.8020408@informidia.com.br |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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(at)informidia(dot)com(dot)br <mailto:felipe(at)informidia(dot)com(dot)br>
Web: www.informidia.com.br <http://www.informidia.com.br/>
Antes de imprimir lembre-se de sua responsabilidade e comprometimento
com o Meio Ambiente
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2010-12-15 17:25:20 | Re: Fast Insert and Update (through COPY) |
Previous Message | Adrian Klaver | 2010-12-15 17:00:40 | Re: How to restore from backup to 8.4.3 server using 9.0 dump/restore |