Hello!

I'm willing to implement the 'Add support for interface/ipaddress binding
to libpq' feature from the ToDo list.
Actually, the 'ipaddress' part.

For this I'm planning to do the following:
    - Introduce 'sourceaddr' parameter keyword and 'PGSOURCEADDR' env var
which can be used to specify local IPv4 or IPv6 ipaddress to bind to
    - Silently ignore the parameter's value in case of Unix-domain
communication with database
    - Use BLOCKING bind() call to bind communication socket to specified
local ipaddress in two functions:
        src/interfaces/libpq/fe-connect.c@internal_cancel()
        src/interfaces/libpq/fe-connect.c@PQconnectPoll()

Is this enough or I missed something?

WBR, Grigory.

Reply via email to