X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B3C8F52C7B for ; Fri, 19 Aug 2005 14:31:41 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 30998-08 for ; Fri, 19 Aug 2005 17:31:38 +0000 (GMT) Received: from gwmta.wicourts.gov (gwmta.wicourts.gov [165.219.244.91]) by svr1.postgresql.org (Postfix) with ESMTP id A43BB52C71 for ; Fri, 19 Aug 2005 14:31:32 -0300 (ADT) Received: from Courts-MTA by gwmta.wicourts.gov with Novell_GroupWise; Fri, 19 Aug 2005 12:31:32 -0500 Message-Id: X-Mailer: Novell GroupWise Internet Agent 6.5.4 Date: Fri, 19 Aug 2005 12:31:24 -0500 From: "Kevin Grittner" To: Cc: Subject: Re: java.sql.SQLException: ERROR: canceling query due Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200508/144 X-Sequence-Number: 13713 So you would add a variable to the statement class to save to when the set = method is invoked, return this value from the get method, and when an = execute method is invoked, if the value is non-zero, you would bracket = what is currently sent to the server with a SET to the non-zero value and = back to zero (in a finally clause)? >>> Kris Jurka 08/19/05 12:08 PM >>> On Fri, 19 Aug 2005, Kevin Grittner wrote: > I'm curious whether "SET statement_timeout=3Dn" sets this for a=20 > connection. If so, wouldn't it be a good thing to update the JDBC=20 > setQueryTimeout and getQueryTimeout methods to use these SET and SHOW=20 > statements? > Yes, it sets it per connection, but the problem is that the JDBC level=20 needs it per Statement. So we'd have to set/reset it for each command.=20 I was originally concerned about thread safety and transactions, but=20 thinking about it some more now the monitor around QueryExecutorImpl=20 should protect against that. Maybe this is easier than I thought. Kris Jurka