-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
dedicated_connection() does not expose underlying connection for polling message from postgres #60
Comments
Ugh, that's kind of nasty. Maybe we should add a method onto |
It seems like a weird API from |
That could work. Although this is not a high-priority issue (at least not for me...). Since we are using a dedicated connection already, right now I just use
There does seem to be some friction between |
It appears you have to drive the connection yourself if you want to get |
The general expectation is that if you want to forward notifications to a stream, you'd write that code and then spawn it off: https://github.com/sfackler/rust-postgres/blob/master/tokio-postgres/tests/test/main.rs#L616-L619 What would a query_raw function do? |
Ah, that general expectation is actually reasonable. But it's different from what I read into the documentation for Maybe link that example code from the |
The
dedicated_connection()
function returnsM::Connection
. Forbb8-postgres
, this type maps to thetokio_postgres::Client
type. However, for receivingLISTEN
notifications frompostgres
, we need thetokio_postgres::Connection
value. Is there some way to achieve this withbb8
?Thanks!
The text was updated successfully, but these errors were encountered: