Thread: supporting any/all connection types including unix domain sockets
I'm writing an app using JavaFX to connect to arbitrary PostgreSQL nodes and take generic and introspective actions. Ideally the user should be able to connect via all previously configured means. Has anyone used Java to connect to a Postgres instance via the unix domain socket? Any source I can view? Travis
On Mon, Jul 13, 2015 at 7:51 PM, Travis Wellman <travis@traviswellman.com> wrote: > I'm writing an app using JavaFX to connect to arbitrary PostgreSQL > nodes and take generic and introspective actions. Ideally the user > should be able to connect via all previously configured means. Has > anyone used Java to connect to a Postgres instance via the unix domain > socket? Any source I can view? I guess you have to reimplement the protocol used for instance in libpq. I'm not sure this is a winning choice, why not using the JDBC connection mechanism? Luca
Because I need to be able to connect in whatever way was previously configured.
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
On July 15, 2015 3:42:19 AM PDT, Luca Ferrari <fluca1978@infinito.it> wrote:
On Mon, Jul 13, 2015 at 7:51 PM, Travis Wellman
<travis@traviswellman.com> wrote:I'm writing an app using JavaFX to connect to arbitrary PostgreSQL
nodes and take generic and introspective actions. Ideally the user
should be able to connect via all previously configured means. Has
anyone used Java to connect to a Postgres instance via the unix domain
socket? Any source I can view?
I guess you have to reimplement the protocol used for instance in libpq.
I'm not sure this is a winning choice, why not using the JDBC
connection mechanism?
Luca
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
On Wed, Jul 15, 2015 at 4:07 PM, Travis Wellman <travis@traviswellman.com> wrote: > Because I need to be able to connect in whatever way was previously > configured. Then I'll take a look at libpq details. However, I believe this is not the right path, I mean there's nothing insecure in configuring a single user to access via tcp/ip (secure) sockets and use well tested jdbc code. My 2cents. Luca
On 16 July 2015 at 02:21, Luca Ferrari <fluca1978@infinito.it> wrote:
On Wed, Jul 15, 2015 at 4:07 PM, Travis Wellman
<travis@traviswellman.com> wrote:
> Because I need to be able to connect in whatever way was previously
> configured.
Then I'll take a look at libpq details.
However, I believe this is not the right path, I mean there's nothing
insecure in configuring a single user to access via tcp/ip (secure)
sockets and use well tested jdbc code.
My 2cents.
Luca
Yes, the notion would be to hook into the JDBC code with something that communicated with sockets instead
Is it the same protocol?
On July 16, 2015 3:31:13 AM PDT, Dave Cramer <pg@fastcrypt.com> wrote:
On 16 July 2015 at 02:21, Luca Ferrari <fluca1978@infinito.it> wrote:On Wed, Jul 15, 2015 at 4:07 PM, Travis Wellman
<travis@traviswellman.com> wrote:
> Because I need to be able to connect in whatever way was previously
> configured.
Then I'll take a look at libpq details.
However, I believe this is not the right path, I mean there's nothing
insecure in configuring a single user to access via tcp/ip (secure)
sockets and use well tested jdbc code.
My 2cents.
LucaYes, the notion would be to hook into the JDBC code with something that communicated with sockets instead
On Thu, Jul 16, 2015 at 7:08 PM, Travis Wellman <travis@traviswellman.com> wrote: > Is it the same protocol? At the very low end it is the same protocol: http://www.postgresql.org/docs/current/static/protocol.html Luca