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 Database.prototype.on('connect') event #220

Open
alik-datsko opened this issue Nov 17, 2021 · 0 comments
Open

Add Database.prototype.on('connect') event #220

alik-datsko opened this issue Nov 17, 2021 · 0 comments

Comments

@alik-datsko
Copy link

It would be great if we could check pg_backend_pid before executing the query.
When pg closed an idle connection, it creates a new one along with the query. At this moment I would like to create a link pg_backend_pid => user_id (session variables or a table insert).
This is necessary for the organization of RLS at the database level.
I would be grateful if you enable this feature or suggest an worarround.

@tshemsedinov tshemsedinov changed the title on('connect') emitter in Database class Add Database.prototype.on('connect') event Aug 2, 2022
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

2 participants