Re: transactions in multiple action rules

Поиск
Список
Период
Сортировка
От 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 по дате отправления:

Предыдущее
От: Marcelo Cid
Дата:
Сообщение: RES: RES: NewsForge Poll: Favorite open source database ?
Следующее
От: Russ Brown
Дата:
Сообщение: Re: RES: NewsForge Poll: Favorite open source database?