sfackler / rust-postgres

Native PostgreSQL driver for the Rust programming language
Apache License 2.0
3.43k stars 436 forks source link

`notice_callback` not available in tokio-postgres #1045

Closed to266 closed 1 year ago

to266 commented 1 year ago

https://github.com/sfackler/rust-postgres/pull/655 does not seem to be exposed as part of the tokio_postgres::Config, so it's not really configurable.

Would be nice to support that too :)

sfackler commented 1 year ago

In tokio-postgres you can poll the connection directly: https://docs.rs/tokio-postgres/latest/tokio_postgres/struct.Connection.html#method.poll_message

to266 commented 1 year ago

Ah, nice!

I see it's a bit more elaborate to use, but I have no issue with that. For others, here's a link to tests that do exactly this