Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add context variable about transaction start timestamp [CORE5493] #5762

Open
firebird-automations opened this issue Mar 1, 2017 · 1 comment

Comments

@firebird-automations
Copy link
Collaborator

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

@firebird-automations
Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant