Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 056989FB327 for ; Mon, 9 Apr 2007 13:08:13 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 34739-04 for ; Mon, 9 Apr 2007 13:08:08 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail63.csoft.net (leary.csoft.net [205.205.214.5]) by postgresql.org (Postfix) with SMTP id 3D9F09FB31F for ; Mon, 9 Apr 2007 13:07:30 -0300 (ADT) Received: (qmail 1824 invoked by uid 1112); 9 Apr 2007 16:07:25 -0000 Date: Mon, 9 Apr 2007 12:07:25 -0400 (EDT) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Bellur Ashwin cc: pgsql-jdbc@postgresql.org Subject: Re: Problem with Running Query In-Reply-To: <195732.49845.qm@web50604.mail.re2.yahoo.com> Message-ID: References: <195732.49845.qm@web50604.mail.re2.yahoo.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/10 X-Sequence-Number: 16859 On Fri, 6 Apr 2007, Bellur Ashwin wrote: > I have modified my postgres code to accept queries starting with a word > "My" followed by the query followed by the 1000 #separated values, > inside postgres, i check for the word "My" at the beginning of the query > if found, i will generate 1000 inserts into a table (these 1000 values > are those i have sent after the query with the delimiter #), then > execute the query which is in between "My" and #values, > > Example: My query would look like this > > My select * from xyz1 a, xyz2 b where a.a1=b.a1 #1#2#3........... > > Now my problem is when i try to send the new (appended) query to the > JDBC, i get ArrayIndexOutOfBoundException: Index: 1 Size: 1 from the > executeQuery function, here my query is reaching the postgres and is > executing, but i am getting the exception in my JAVA Program > It certainly seems like an odd and non-standard thing to do so the JDBC driver could easily get confused if you are returning many command completion tags from a single query. A complete stacktrace and driver version would be more useful than this vague error description. Kris Jurka