Re: Writing a user defined function

Поиск
Список
Период
Сортировка
От Raymond O'Donnell
Тема Re: Writing a user defined function
Дата
Msg-id 4880FF2D.2010602@iol.ie
обсуждение исходный текст
Ответ на Writing a user defined function  (Suresh_ <suiyengar@yahoo.com>)
Список pgsql-general
On 18/07/2008 17:07, Suresh_ wrote:
> CREATE OR REPLACE FUNCTION udf()
> RETURNS integer AS $$
> BEGIN
> for i in 1..2000 loop
>   for j in 1...10000 loop
>   end loop;
>   begin work;

     ^^^^^^----- Here's your problem!

You can't have a transaction inside a function - the function is already
executed inside a transaction.

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

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

Предыдущее
От: "Francisco Reyes"
Дата:
Сообщение: Re: Reducing memory usage of insert into select operations?
Следующее
От: "user"
Дата:
Сообщение: Calling Python functions with parameters