Subject Re: Can I create a trigger for insert, update, delete and a transaction commit?
Author un_spoken
> I haven't tested the following, but you might be able emulate that by
> setting a flag in the trigger via RDB$SET_CONTEXT to know, hey my
> trigger fired, then check that flag via RDB$GET_CONTEXT in an ON COMMIT
> trigger to run some kind of post-process stuff with your desired
> changes, e.g. processing logged rows from a temporary table etc.
>
> Sounds a bit fishy though. ;-)
>

Thanks Thomas.

I have slightly different idea but I do not know if I am able to get some sort of transaction ID while I am in trigger?

In the trigger I could then compare the last ID of a transaction with current ID of the transaction. That would be sufficent for me to write the ID of a transaction only once, now matter how much records I am updating.

Is it possible to obtain such transaction ID in a trigger?