Re: COMMIT IN STORED PROCEDURE WHILE IN A LOOP

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: COMMIT IN STORED PROCEDURE WHILE IN A LOOP
Дата
Msg-id 2746245.1666128817@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: COMMIT IN STORED PROCEDURE WHILE IN A LOOP  (Bryn Llewellyn <bryn@yugabyte.com>)
Ответы Re: COMMIT IN STORED PROCEDURE WHILE IN A LOOP  (Laurenz Albe <laurenz.albe@cybertec.at>)
Re: COMMIT IN STORED PROCEDURE WHILE IN A LOOP  (gogala.mladen@gmail.com)
Список pgsql-general
Bryn Llewellyn <bryn@yugabyte.com> writes:
> xof@thebuild.com wrote:
>> You can commit in a loop, but not in BEGIN / END block that has an exception handler: that creates a subtransaction
forthe duration of the BEGIN / END. 

> This surprised me when I first started to use PG (after all those years
> with ORCL).

Really?  BEGIN with an exception block is a subtransaction because it's
defined to roll back to the database state as of the start of the block
if an exception occurs.  COMMIT in the middle fundamentally conflicts
with that, I should think.  Does Oracle interpret that differently?

            regards, tom lane



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

Предыдущее
От: Christophe Pettus
Дата:
Сообщение: Re: COMMIT IN STORED PROCEDURE WHILE IN A LOOP
Следующее
От: Christophe Pettus
Дата:
Сообщение: Re: COMMIT IN STORED PROCEDURE WHILE IN A LOOP