Have a way to borrow the connection out of a PgListener
Is your feature request related to a problem? Please describe. I'm working on a job queue in my project, which involves NOTIFY/LISTEN. Ideally, I would like to react to notifications and reuse the same Postgres connection when I'm processing this notification.
Describe the solution you'd like
PgListener already implements Executor, which helps executing arbitrary queries with it, but my database abstraction would benefit from accessing the &mut PgConnection.
PgListener has a connection private method which gives that, but maybe it should just implement Acquire?
Describe alternatives you've considered Opening a second connection, which feels wrong as when I'm processing notifications, the PgListener connection sits idle anyway.
Additional context -