Re: setQueryTimeout problem !?!?! - Mailing list pgsql-jdbc

From Dave Cramer
Subject Re: setQueryTimeout problem !?!?!
Date
Msg-id 578E4DE9-528A-4844-9D68-065E2A6BC639@fastcrypt.com
Whole thread Raw
In response to Re: setQueryTimeout problem !?!?!  (Oliver Jowett <oliver@opencloud.com>)
Responses Re: setQueryTimeout problem !?!?!  (Guillaume Cottenceau <gc@mnc.ch>)
List pgsql-jdbc
>
>> Sets the number of seconds the driver will wait for a Statement
>> object to execute to the given number of seconds. If the limit is
>> exceeded, an SQLException is thrown. A JDBC driver must apply this
>> limit to the execute, executeQuery and executeUpdate methods. JDBC
>> driver implementations may also apply this limit to ResultSet
>> methods (consult your driver vendor documentation for details).
>
> Drivers "must apply this limit", but we cannot currently do that.
>
> The argument here is that asking the driver to do something it can't
> actually do is a "database access error". So you get a SQLException
> if you ask for a non-zero timeout, since that is not currently
> supported.
>
> See previous discussion that prompted this change at http://archives.postgresql.org/pgsql-jdbc/2008-01/msg00088.php

Unfortunately the argument assumes that our users are developing new
applications, not using the driver in an existing application. I think
this change should be reversed. A considerable number of people will
not be in a position to use an old driver with newer servers just to
avoid this.

Dave

pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: setQueryTimeout problem !?!?!
Next
From: "Woody Woodring"
Date:
Subject: Re: JDBC rewriting a bad query?