| От | Tom Lane |
|---|---|
| Тема | Re: transactions in multiple action rules |
| Дата | |
| Msg-id | 3842.1103611327@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | transactions in multiple action rules (Ron Peterson <rpeterso@mtholyoke.edu>) |
| Список | pgsql-general |
Ron Peterson <rpeterso@mtholyoke.edu> writes:
> Do the multiple actions within a multiple action rule implicitly reside
> within a transaction?
Yes. In the current code it is actually not possible for a single SQL
command issued by the client to give rise to more than one transaction.
(This might change if we invent some kind of stored-procedure engine, but
rules certainly can't do it.)
> (I want to be sure that I can count on 'currval' returning the sequence
> value returned by the previous action's 'nextval',
As Bruno pointed out, that really has nothing to do with how many
transactions are involved. The per-session state that currval uses will
sit quietly for as long as you need.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера