Open firebird-automations opened 7 years ago
Commented by: prenosil (prenosil)
I use trigger
CREATE OR ALTER TRIGGER DBTR_TRANSACTION_START ACTIVE ON TRANSACTION START POSITION 10 AS BEGIN RDB$SET_CONTEXT('USER_TRANSACTION', 'TRANSACTION_TIMESTAMP', CURRENT_TIMESTAMP); END
Submitted by: @livius2
Votes: 1
Please add to context variables transaction start timestamp CURRENT_TRANSACTION_START_TIME
something like other context variables CURRENT_TRANSACTION, CURRENT_TIME It is usefull for e.g. audit - to have whole transaction operations marked with same timestamp.
We can use Select from MON$ tables now, but it cause performance drop - also if included in TRANSACTION START trigger