There is a JDBC interface available for Postgres. It is documented elsewhere using the accepted tool for Java-language code.