Preventing an 'after' trigger from causing rollback on error

Поиск
Список
Период
Сортировка
От Eliot Gable
Тема Preventing an 'after' trigger from causing rollback on error
Дата
Msg-id CAD-6L_Xc3xL0uFTpty79vyTjUdyKew=BtP07AtOGOgVYkku50w@mail.gmail.com
обсуждение исходный текст
Ответы Re: Preventing an 'after' trigger from causing rollback on error
Re: Preventing an 'after' trigger from causing rollback on error
Список pgsql-general
Is there any way I can stop a trigger which fires after a row is inserted into a table from causing a rollback of the entire transaction if something goes wrong?

I have rows being written to a table, and I have triggers which calculate and update statistics automatically in stats tables based on the rows inserted. However, if something goes wrong in that trigger, right now it causes all the inserts to roll back, as well as the stats calculations. I would rather keep all the inserts, but just fail the stats calculates. I can always rematerialize the entire stats table with another procedure if all the rows are present.

Thanks in advance for any assistance.


--
Eliot Gable

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

Предыдущее
От: John R Pierce
Дата:
Сообщение: Re: Tab completion not working on OSX Lion (10.7.3)
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Preventing an 'after' trigger from causing rollback on error