Re: Transactions within a function

Поиск
Список
Период
Сортировка
От Doug McNaught
Тема Re: Transactions within a function
Дата
Msg-id m37kxm89oz.fsf@belphigor.mcnaught.org
обсуждение исходный текст
Ответ на Transactions within a function  (Daniel Åkerud <zilch@home.se>)
Список pgsql-general
Daniel �kerud <zilch@home.se> writes:

> Do the BEGIN and END in a function also indicate that it is done in a
> transaction?  Or can you put another BEGIN TRANSACTION; END
> TRANSACTION; in there?

Please don't post in HTML.

A function is always executed within a transaction--either an explicit
one (where the user issues BEGIN TRANSACTION) or the implicit
transaction created by issuing a single SQL statememt.  Since PG
doesn't allow nested transactions, you can't have a transaction inside
a function.

-Doug
--
The rain man gave me two cures; he said jump right in,
The first was Texas medicine--the second was just railroad gin,
And like a fool I mixed them, and it strangled up my mind,
Now people just get uglier, and I got no sense of time...          --Dylan

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

Предыдущее
От: "Brent R. Matzelle"
Дата:
Сообщение: Re: which Python interface
Следующее
От: Morgan Curley
Дата:
Сообщение: Cross database foreign keys