Is possible to use Prepare/Execute inside a function?

Поиск
Список
Период
Сортировка
От felipe@informidia.com.br
Тема Is possible to use Prepare/Execute inside a function?
Дата
Msg-id 4D08F69D.8020408@informidia.com.br
обсуждение исходный текст
Ответы Re: Is possible to use Prepare/Execute inside a function?  (Alban Hertroys <dalroi@solfertje.student.utwente.nl>)
Список 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@informidia.com.br
Web: www.informidia.com.br
Antes de imprimir lembre-se de sua responsabilidade e comprometimento com o Meio Ambiente
Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: How to restore from backup to 8.4.3 server using 9.0 dump/restore
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Fast Insert and Update (through COPY)