Re: Can I make a function an explicit transaction within?

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Can I make a function an explicit transaction within?
Дата
Msg-id 200304171139.15974.josh@agliodbs.com
обсуждение исходный текст
Ответ на Can I make a function an explicit transaction within?  (Ivicz László <ivicz@foxart.hu>)
Список pgsql-novice
Laci,

> I have tried in 7.3 to make a PL/pgSQL function with an explicit Begin
> Transaction; Rollback; and Commit;.
> The editor allowed to save it (pgAdmin II), but each of the above
> commands caused a
> runtime error in any variation.
> My question is: Can I make a function with explicit transaction in any
> procedural language (mainly in PL/pgSQL)?

I'm afraid not.   In PostgreSQL, each function is by definition a transaction,
and Postgres does not yet support nested transactions.

--
-Josh Berkus
 Aglio Database Solutions
 San Francisco


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

Предыдущее
От: "Benjamin RICHARD"
Дата:
Сообщение: Using array in Functions plpgsql
Следующее
От: Jean-Christian Imbeault
Дата:
Сообщение: select distinct() question