Re: COMMIT IN STORED PROCEDURE WHILE IN A LOOP

Поиск
Список
Период
Сортировка
От Ravi Krishna
Тема Re: COMMIT IN STORED PROCEDURE WHILE IN A LOOP
Дата
Msg-id VOMN1IM86IU4.HNL8WUVWUAMM3@ravi-surface
обсуждение исходный текст
Ответ на Re: COMMIT IN STORED PROCEDURE WHILE IN A LOOP  (Christophe Pettus <xof@thebuild.com>)
Ответы Re: COMMIT IN STORED PROCEDURE WHILE IN A LOOP  (Christophe Pettus <xof@thebuild.com>)
Список pgsql-general
> You can commit in a loop, but not in BEGIN / END block that has an exception handler:
> that creates a subtransaction for the duration of the BEGIN / END.

The reason I have to deal with error exception is that I want to ignore failure on a table and move on to next table. 

I thought I can trick it by moving the part of the code which executes dynamic sql and has exception handler in it,
to a separate procedure.  This way I can keep the main procedure without exception handler.  It failed too with
the same error.  So that means this restriction is not at lexical level, but at execution level.
This is so disappointing.  It seems there is no way I can copy each table and commit it individually and also capture error.

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

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