wp.jochen.hayek.name/blog-en

how to connect to a PostgreSQL database using JDBC w/o host

I am giving Jan Lolling’s SQLRunner a try to connect to a local PostgreSQL database. SQLRunner is written in Java, and it uses JDBC to connect to the various databases.

Apparently there are 2 ways to connect to a PostgreSQL database:

  1. hostname + port + database + …
  2. socket + database + …

The 2nd way is not just a variant of the 1st (I got told).

It appears to me, that JDBC for PostgreSQL only supports the first way. Is there a way to get this assumption confirmed?

Exit mobile version