Re: pgmemcache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Not sure if I follow why this is a problem. Seems like it would be beneficial to have both BEFORE and AFTER COMMIT triggers. With the BEFORE COMMIT trigger you would have the ability to 'un- commit' (rollback) the transaction. With the AFTER COMMIT trigger you wouldn't have that option because the commit has already been successful. However, with an AFTER COMMIT you would be able to trigger other downstream events that rely on a transaction successfully committing. If the trigger fails it is the triggers problem, it isn't the commit's problem, i.e., you wouldn't want to 'un-commit'. If the trigger
gets an error it has to gracefully deal with that error programatically.

Where have I gone astray with this logic?

On Apr 12, 2006, at 5:35 PM, Tom Lane wrote:

"Jim C. Nasby" <jnasby@xxxxxxxxxxxxx> writes:
Why are AFTER COMMIT triggers impossible?

What happens if such a trigger gets an error?  You can't un-commit.

			regards, tom lane



[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux