X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id DC8389DCC69 for ; Thu, 15 Dec 2005 17:58:36 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 84480-06 for ; Thu, 15 Dec 2005 17:58:38 -0400 (AST) X-Greylist: delayed 00:20:17.167704 by SQLgrey- Received: from curry.tmsl.demon.co.uk (tmsl-adsl.demon.co.uk [80.177.114.181]) by postgresql.org (Postfix) with ESMTP id 112299DCC7C for ; Thu, 15 Dec 2005 17:58:33 -0400 (AST) Received: from bacon.tmsl.demon.co.uk (bacon.tmsl.demon.co.uk [192.168.7.102]) by curry.tmsl.demon.co.uk (8.11.6/8.11.6) with ESMTP id jBFLcFU06130; Thu, 15 Dec 2005 21:38:15 GMT Date: Thu, 15 Dec 2005 21:38:11 +0000 From: Paul Thomas To: Assad Jarrahian Cc: pgsql-jdbc@postgresql.org Subject: Re: an efficient way of checking if the connection to a db is actually open Message-ID: <20051215213811.E5278@bacon> References: <4bd3e1480512151247u50479082vd08b9a1563d54604@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=ISO-8859-1 In-Reply-To: <4bd3e1480512151247u50479082vd08b9a1563d54604@mail.gmail.com>; from jarraa@gmail.com on Thu, Dec 15, 2005 at 20:47:03 +0000 X-Mailer: Balsa 1.2.3 Lines: 15 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200512/62 X-Sequence-Number: 14393 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 | +------------------------------+-------------------------------------------+