X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 50F7953C79 for ; Thu, 28 Apr 2005 11:21:12 -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 26494-02 for ; Thu, 28 Apr 2005 14:21:09 +0000 (GMT) Received: from mail63.csoft.net (leary3.csoft.net [63.111.22.74]) by svr1.postgresql.org (Postfix) with SMTP id 3440453D0E for ; Thu, 28 Apr 2005 11:21:03 -0300 (ADT) Received: (qmail 9758 invoked by uid 1112); 28 Apr 2005 14:21:06 -0000 Date: Thu, 28 Apr 2005 09:21:06 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Tom Lane Cc: Markus Schaber , "pgsql-jdbc@postgresql.org" Subject: Re: Statement Timeout and Locking In-Reply-To: <11053.1114697497@sss.pgh.pa.us> Message-ID: References: <4270BAE0.1020402@logix-tt.com> <11053.1114697497@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.012 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/199 X-Sequence-Number: 12806 On Thu, 28 Apr 2005, Tom Lane wrote: > Markus Schaber writes: > > conn.createStatement().execute("SET statement_timeout TO 5000; LOCK TABLE exampletable IN EXCLUSIVE MODE; SET statement_timeout TO DEFAULT;"); > > At least in more recent JDBC drivers, I'd expect the above to fail > entirely because you can only put one SQL command per V3 Parse message. > Try splitting it into three statements. > The JDBC driver splits this query itself and issues it in three queries internally. Kris Jurka