Re: how to force an insert before Raise Exception?

Поиск
Список
Период
Сортировка
От Taras Kopets
Тема Re: how to force an insert before Raise Exception?
Дата
Msg-id BANLkTim=ke+gnwedsKO6oBcjymLTxQLeVA@mail.gmail.com
обсуждение исходный текст
Ответ на how to force an insert before Raise Exception?  (giova <giovainstall2@yahoo.fr>)
Список pgsql-general
On Tue, Apr 19, 2011 at 4:39 PM, giova <giovainstall2@yahoo.fr> wrote:
> My problem is that i want to do an INSERT into a log table before to raise
> the exception. But RAISE EXCEPTION cancels my Insert.

That's the point of transaction, if it failed the data and any other
changes are rolled back.
You can use dblink (http://www.postgresql.org/docs/current/static/dblink.html),
which will issue a separate connection to database to simulate
autonomous transaction.

Regards,
Taras Kopets

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: how to force an insert before Raise Exception?
Следующее
От: Phoenix Kiula
Дата:
Сообщение: Questions about Partitioning