Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Bugs > Re: Re: BUG #41...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 8 Topic 3726 of 4088
Post > Topic >>

Re: Re: BUG #4123: Statement.setQueryTimeout does not work

by books@[EMAIL PROTECTED] (Kris Jurka) Apr 24, 2008 at 06:28 AM

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-bugs@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
 




 8 Posts in Topic:
BUG #4123: Statement.setQueryTimeout does not work with Postgres
amit.mujawar@[EMAIL PROTE  2008-04-22 10:05:03 
Re: BUG #4123: Statement.setQueryTimeout does not work with
books@[EMAIL PROTECTED]   2008-04-22 11:53:19 
Re: BUG #4123: Statement.setQueryTimeout does not work with Post
valgog <valgog@[EMAIL   2008-04-23 03:52:11 
Re: BUG #4123: Statement.setQueryTimeout does not work with Post
valgog <valgog@[EMAIL   2008-04-23 03:59:03 
Re: Re: BUG #4123: Statement.setQueryTimeout does not work
books@[EMAIL PROTECTED]   2008-04-24 06:28:18 
Re: BUG #4123: Statement.setQueryTimeout does not work with Post
valgog <valgog@[EMAIL   2008-04-25 09:59:54 
Re: BUG #4123: Statement.setQueryTimeout does not work
Kevin.Grittner@[EMAIL PRO  2008-04-25 16:38:08 
Re: BUG #4123: Statement.setQueryTimeout does not work with Post
valgog <valgog@[EMAIL   2008-04-27 23:07:39 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 6:24:47 CDT 2008.