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

[feature req] session startup query #372

Closed
bjeanes opened this issue Jun 3, 2020 · 1 comment
Closed

[feature req] session startup query #372

bjeanes opened this issue Jun 3, 2020 · 1 comment

Comments

@bjeanes
Copy link
Contributor

bjeanes commented Jun 3, 2020

Upon a new session/connection it is sometimes useful to run a query or two, such as:

SET statement_timeout = '2s';

or

SET plv8.start_proc = 'plv8_init';

In a situation where you are using a Pool connections might idle out or be refreshed, so I think this would have to be something that sqlx would provide a feature for (or some kind of "new connection" hook/closure) in order to be reliable.

I know this is pretty niche and probably not likely to be a high priority, but what do you think?

@abonander
Copy link
Collaborator

This is being discussed in #263.

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

No branches or pull requests

2 participants