Обсуждение: Add support for interface/ipaddress binding to libpq

Поиск
Список
Период
Сортировка

Add support for interface/ipaddress binding to libpq

От
Grigory Kareev
Дата:
<div dir="ltr">Hello!<br /><br />I'm willing to implement the 'Add support for interface/ipaddress binding to libpq'
featurefrom the ToDo list.<br />Actually, the 'ipaddress' part.<br /><br />For this I'm planning to do the
following:<br/>    - Introduce 'sourceaddr' parameter keyword and 'PGSOURCEADDR' env var which can be used to specify
localIPv4 or IPv6 ipaddress to bind to<br />    - Silently ignore the parameter's value in case of Unix-domain
communicationwith database<br />    - Use BLOCKING bind() call to bind communication socket to specified local
ipaddressin two functions:<br />        src/interfaces/libpq/fe-connect.c@internal_cancel()<br />       
src/interfaces/libpq/fe-connect.c@PQconnectPoll()<br/><br />Is this enough or I missed something?<br /><br />WBR,
Grigory.<br/></div>