Re: Simple DB presence verifier. - Mailing list pgsql-novice

From Damian C
Subject Re: Simple DB presence verifier.
Date
Msg-id 2bbc8f530703051159t6198523fk95eebc41b6dfc500@mail.gmail.com
Whole thread Raw
In response to Re: Simple DB presence verifier.  ("Abbas" <abbas@enterprisedb.com>)
List pgsql-novice
Many thanks to John, Abbas and Darkangel for their informative replies.

Initially I will simply establish a socket to port 5432 of the server.
This is trivial to do in Java, quick to succeed (or fail), and
provides appropriate information. Something (notionally) like this
(for future googlers !!!)...
<snip>
try {
  InetAddress address = InetAddress.getByName("192.168.1.2");
  Socket dbSocket = new Socket(address, 5432);
  dbSocket.close();
  return true;
} catch (Exception e) {
  return false;
}
</snip>

Many thanks,
-Damian

pgsql-novice by date:

Previous
From: "Darkangel Simpson"
Date:
Subject: Re: Simple DB presence verifier.
Next
From: "Peter Schonefeld"
Date:
Subject: help with dynamic table name