Re: support for Unix Domain socket - Mailing list pgsql-jdbc

From Lachezar Dobrev
Subject Re: support for Unix Domain socket
Date
Msg-id CA+xsaB0O49sVKWYqa+CFcKVh2Cxcvy2te2H1B_836+CZ=nXP+w@mail.gmail.com
Whole thread Raw
In response to support for Unix Domain socket  (Raj Gandhi <raj01gandhi@gmail.com>)
List pgsql-jdbc
  Looking at the code it seems that this function is primarily targeted towards specifying alternate SSL socket implementation, rather than UNIX sockets. There are a number of socket factories in the PostgreSQL driver:
  * org.postgresql.ssl.jdbc4.LibPQFactory
  * org.postgresql.ssl.NonValidatingFactory
  * org.postgresql.ssl.SingleCertValidatingFactory
  and even an abstract base class:
  * org.postgresql.ssl.DbKeyStoreSocketFactory

  The Java Socket infrastructure is quite tied up to AF_INET and seems it is infeasible that UNIX Sockets will be supported via a SocketFactory.
 

2016-02-25 18:11 GMT+02:00 Raj Gandhi <raj01gandhi@gmail.com>:
Hi All,

The change log for Postgres jdbc version 9.4-1208 shows that some support was added for unix domain socket

  • feat: ability to customize socket factory (e.g. for unix domain sockets) PR#457 dc1844c

Could someone tell me how to configure JDBC connection to use unix domain socket?
I'm planning to use it with Postgres server version 9.3.8 on Suse.

Thanks,
Raj

pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: support for Unix Domain socket
Next
From: Lachezar Dobrev
Date:
Subject: Re: support for Unix Domain socket