Re: pre-commit triggers
| От | Hannu Krosing |
|---|---|
| Тема | Re: pre-commit triggers |
| Дата | |
| Msg-id | 5287CEF9.3020908@2ndQuadrant.com обсуждение исходный текст |
| Ответ на | pre-commit triggers (Andrew Dunstan <andrew@dunslane.net>) |
| Ответы |
Re: pre-commit triggers
Re: pre-commit triggers |
| Список | pgsql-hackers |
On 11/15/2013 07:01 PM, Andrew Dunstan wrote:
I have not looked at the patch, but does it also run pre-rollback ?
Attached is a patch to provide a new event trigger that will fire on transaction commit. I have tried to make certain that it fires at a sufficiently early stage in the commit process that some of the evils mentioned in previous discussions on this topic aren't relevant.
The triggers don't fire if there is no real XID, so only actual data changes should cause the trigger to fire.
If not, how hard would it be to make it so ?
They also don't fire in single user mode, so that if you do something stupid like create a trigger that unconditionally raises an error you have a way to recover.
This is intended to be somewhat similar to the same feature in the Firebird database, and the initial demand came from a client migrating from that system to Postgres.
cheers
andrew
-- Hannu Krosing PostgreSQL Consultant Performance, Scalability and High Availability 2ndQuadrant Nordic OÜ
В списке pgsql-hackers по дате отправления: