| От | Neil Conway |
|---|---|
| Тема | Re: two concurrency questions |
| Дата | |
| Msg-id | 1046824065.10528.10.camel@tokyo обсуждение исходный текст |
| Ответ на | two concurrency questions (Jeff Patterson <jpat@mpip.org>) |
| Список | pgsql-general |
On Mon, 2003-03-03 at 21:20, Jeff Patterson wrote: > 1: Are user defined functions (eg pgplsql) atomic? I.e. if my function > updates a bunch of rows and one update fails for one reason or another > does it automatically roll-back to the state before the function was called? > > 2: If an update causes a trigger and the trigger updates a row and the > trigger fails, what happens? Is there a way to atomize the whole process? Both operations occur inside a transaction (if you don't explicitly start a transaction, PostgreSQL does it for you), so they should both be atomic: when an error occurs, the current transaction is aborted. Cheers, Neil -- Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера