Skip site navigation (1) Skip section navigation (2)

Re: BUG #4123: Statement.setQueryTimeout does not work with Postgres Java Driver

From: valgog <valgog(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4123: Statement.setQueryTimeout does not work with Postgres Java Driver
Date: 2008-04-25 16:59:54
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Ok, understood... that could not be so easy anyway :) I supposed that
it should be something, that lays in the JDBC specs...


-- Valentine

On Apr 24, 12:28 pm, bo(dot)(dot)(dot)(at)ejurka(dot)com (Kris Jurka) wrote:
> On Wed, 23 Apr 2008, valgog wrote:
> > Is it possible to implement the setStatementTimeout() as somethig
> > like:
> > s = c.prepareStatement("SELECT set_config('statement_timeout',
> > <neededTimeoutInMilliseconds>, false);" );
> > s.executeQuery();
> > c.commit();
> Not really.  This sets a global timeout for all queries while the JDBC API
> specifies that it is per-Statement.  Also this only protects against long
> running queries.  Recently there was some discussion on the JDBC list
> about soft vs hard timeouts and it seemed the conclusion was that people
> wanted setQueryTimeout to protect against things like the network
> connection dropping that statement_timeout can't do.
> In many cases statement_timeout is an adequate substitute for
> setQueryTimeout, but not in the general case that the JDBC driver must
> implement.
> Kris Jurka
> --
> Sent via pgsql-bugs mailing list (pgsql-b(dot)(dot)(dot)(at)postgresql(dot)org)
> To make changes to your subscription:

In response to


pgsql-bugs by date

Next:From: Kevin GrittnerDate: 2008-04-25 21:38:08
Subject: Re: BUG #4123: Statement.setQueryTimeout does not workwith Postgres Java Driver
Previous:From: Zdenek KotalaDate: 2008-04-25 10:06:09
Subject: Re: problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group