Re: an efficient way of checking if the connection to a db is actually open

From: Paul Thomas <paul(at)tmsl(dot)demon(dot)co(dot)uk>
To: Assad Jarrahian <jarraa(at)gmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: an efficient way of checking if the connection to a db is actually open
Date: 2005-12-15 21:38:11
Message-ID: 20051215213811.E5278@bacon
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


On 15/12/2005 20:47 Assad Jarrahian wrote:
> The documentation says, the only real way is to actually call an sql
> statement on it. That seems inefficient. Is there any other way that is
> recommended?

Something like SELECT now() would be quick as doesn't involve any database
access.

--
Paul Thomas
+------------------------------+-------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for Business |
| Computer Consultants | http://www.thomas-micro-systems-ltd.co.uk |
+------------------------------+-------------------------------------------+

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2005-12-15 21:42:14 Re: an efficient way of checking if the connection to a db
Previous Message Assad Jarrahian 2005-12-15 20:47:03 an efficient way of checking if the connection to a db is actually open