| From: | "Steffen Heil (Mailinglisten)" <lists(at)steffen-heil(dot)de> |
|---|---|
| To: | "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org> |
| Subject: | Patch fo select ip and/or port for outgoing connections |
| Date: | 2015-08-15 17:16:11 |
| Message-ID: | 3bdf77beeaa149aeb8972af5b586271b@exchange.sh-solutions.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-jdbc |
Hi
In our environment we had the requirement to enforce that (on a multihomed server) the database driver uses a certain local ip to connect to the database server.
In java this can easily be archived calling "bind" on the tcp socket before calling connect.
I patched the source of the jdbc driver to make this available through the connection properties "BIND_IP" and "BIND_PORT".
Both are optional, we are using "BIND_IP" in production code.
I attached the patch for everyone to use in any way.
(I am unsure about the contribution process and license requirements but you can use this code however you see fit).
I would be grateful, if this patch or another way to archive the same goal could be included in the next release...
Best regards,
Steffen
| Attachment | Content-Type | Size |
|---|---|---|
| postgresql-9.4-1201-bind.patch | application/octet-stream | 2.5 KB |
| smime.p7s | application/pkcs7-signature | 6.2 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Dave Cramer | 2015-08-15 19:22:46 | Re: Patch fo select ip and/or port for outgoing connections |
| Previous Message | Vladimir Sitnikov | 2015-08-11 17:22:36 | Re: PreparedStatement.setDate() behavior with OVERLAPS |