Re: Transactions in functions ( was Re: transactions, serial ids, and JDBC)
В списке pgsql-general по дате отправления:
| От | Martijn van Oosterhout |
|---|---|
| Тема | Re: Transactions in functions ( was Re: transactions, serial ids, and JDBC) |
| Дата | |
| Msg-id | 20020810130027.A19769@svana.org обсуждение исходный текст |
| Ответ на | Transactions in functions ( was Re: transactions, serial ids, and JDBC) (Steve Lane <slane@fmpro.com>) |
| Список | pgsql-general |
On Fri, Aug 09, 2002 at 08:48:34PM -0500, Steve Lane wrote: > I believe I read elsewhere that transactional logic doesn't work or doesn't > apply in a function. And the message above seems to imply that the function > will behave transactionally without explicit begin/commit. I think you mean that you cannot start new transactions within a function.; This is true as postgres does not support nested transactions. However, functions are always within a transaction as they always appear as part of a statement at the top level. > So what do I need to do, or not do, in order that the function executes the > way I intend, that all three UPDATES will succeed or fail? Nothing. It'll work that way anyway. -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > There are 10 kinds of people in the world, those that can do binary > arithmetic and those that can't.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера