Re: triggers on prepare, commit, rollback... ?
От | Hannu Krosing |
---|---|
Тема | Re: triggers on prepare, commit, rollback... ? |
Дата | |
Msg-id | 1211270280.8174.20.camel@huvostro обсуждение исходный текст |
Ответ на | Re: triggers on prepare, commit, rollback... ? (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: triggers on prepare, commit, rollback... ?
|
Список | pgsql-hackers |
On Mon, 2008-05-19 at 21:53 -0400, Tom Lane wrote: > Bruce Momjian <bruce@momjian.us> writes: > >>> trigger on "prepare", "commit", "rollback", "savepoint", > >> > >> This is a sufficiently frequently asked question that I wish someone > >> would add an entry to the FAQ about it, or add it to the TODO list's > >> "Features we don't want" section. > > > OK, remind me why we don't want it again? > > I'm sure I've ranted on this several times before, but a quick archive > search doesn't find anything. So, here are a few points to chew on: > > * Trigger on rollback: what's that supposed to do? Tell others that this trx failed, maybe log a failure ? OTOH, this can be implemented by a daemon that sits on "tail -f logfile | grep ROLLBACK" > The current > transaction is already aborted, so the trigger has no hope of making any > database changes that will ever be visible to anyone. after reading your explanations trigger on rollback/failure is the only one what makes sense still, but it may be that after failure it does not have enough state usable to report anything useful. ----------------- Hannu
В списке pgsql-hackers по дате отправления: