asyncpg icon indicating copy to clipboard operation
asyncpg copied to clipboard

Feature request: A connection property to retreive host name used in specific connection

Open aldem opened this issue 1 year ago • 0 comments

When multiples hosts are specified, either pool or connection could use any of them (depending on target_session_attrs).

It would be nice to have a way to retrieve the actual (connected) host name, as it was provided in the list, that was used to create a specific connection.

Currently, I found no easy way how to do this. Of course, it is possible to use SELECT inet_server_addr() but this only returns an address, which is not always useful.

Thank you!

aldem avatar Dec 03 '24 16:12 aldem