Re: nested transaction

Поиск
Список
Период
Сортировка
От Rodríguez Rodríguez, Pere
Тема Re: nested transaction
Дата
Msg-id B35596C2EFF3D2118EE100A0C94B2A60014BFB1A@palamos_nt
обсуждение исходный текст
Ответ на nested transaction  ("Rodríguez Rodríguez, Pere" <prr@hosppal.es>)
Ответы Re: nested transaction  (Csaba Nagy <nagy@ecircle-ag.com>)
Список pgsql-general

>> For example, I have a pA procedure that update some data, so this procedure
>> execute a begin, after manipulate data and ends with commit/rollback. pA
>> procedure can to be called directly by the client aplication. In other
>> hand, I have a pB procedure that also update some data and calls pA
>> procedure, so pB procedure execute a begin, after manipulate data, after
>> call pA procedure and ends with commit/rollback. pB procedure can also to
>> be called directly by the client aplication.
>>
>> The problem is that pA procedure can't do a new transaction, so what can I
>> do?
>
>Use savepoints all the time.

then, when I must open the transaction?, where I put begin command?, and commit/rollback?

The two store procedures, pA and pB, can to be called directly by the client aplication, so pA and pB must open a transaction, but if pA is called by pB, then pA can't do a new begin command, insted of pA can do a savepoint if pA can detect that there is alredy an open transaction, but, how can pA detect that there is an open transaction?

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

Предыдущее
От: Doug McNaught
Дата:
Сообщение: Re: Listing views
Следующее
От: Csaba Nagy
Дата:
Сообщение: Re: nested transaction