Joel Burton <jburton(at)scw(dot)org> writes:
> 3) the trigger TRANSACTION_AFTER is called, and from that, we can scan the
> table, and actually do some of these system calls?
The "deferred trigger" (AFTER trigger) mechanism already does that, ie,
let you get control just before commit. However, it's no solution to
the rollback problem. What if you have several deferred triggers and
one of the later ones fails (thereby aborting the transaction)? You
already did the unreversible outside-the-database operation...
regards, tom lane