Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 9F6719FB37C for ; Fri, 3 Aug 2007 22:12:05 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 13548-06 for ; Fri, 3 Aug 2007 22:11:50 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.187]) by postgresql.org (Postfix) with ESMTP id 7ED6D9FB35E for ; Fri, 3 Aug 2007 22:12:01 -0300 (ADT) Received: by fk-out-0910.google.com with SMTP id b27so932524fka for ; Fri, 03 Aug 2007 18:11:59 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:organization:user-agent:mime-version:to:cc:subject:references:in-reply-to:x-enigmail-version:content-type:content-transfer-encoding; b=RC1j7YiXw3uBlUta6cP/+hkd6DhaGbQOq8PxbGRd0leddglP7tigYCOoC/4AHdJ5f4FEVaYJzi6pbr6f5enJcK1D3NFl+cM4MlYcBsC4d4rM5J67hj6naEP34HnkI6adJU3dVDhIloHAZ1iLZi97bWjh30XXkQJXen9DOWbiV3U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:organization:user-agent:mime-version:to:cc:subject:references:in-reply-to:x-enigmail-version:content-type:content-transfer-encoding; b=fNZ3MBgtSVmnBAq5Xb4fg9jRQtWbJoXD2IUHkcub04Vuk5u+QKv4Y4o0BgOUzi36PD5FSSmeda/zCqSpTXCTjzX3cEfK3vw1KwVQiE6jjLZ1HAPXtHiCxTxA3iXw1FVg5rYSxJznKUXXXBKXTqz5bThD4DOe7WQbynswlw1OOx0= Received: by 10.86.4.2 with SMTP id 2mr2672605fgd.1186189919599; Fri, 03 Aug 2007 18:11:59 -0700 (PDT) Received: from ?192.168.1.212? ( [81.196.40.147]) by mx.google.com with ESMTPS id v23sm7472209fkd.2007.08.03.18.11.58 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 03 Aug 2007 18:11:58 -0700 (PDT) Message-ID: <46B3D25A.7000103@gmail.com> Date: Sat, 04 Aug 2007 04:11:54 +0300 From: =?ISO-8859-1?Q?Albert_L=E1szl=F3-R=F3bert?= Reply-To: albertlaszlorobert@gmail.com Organization: RSoft Solutions S.R.L. User-Agent: Thunderbird 1.5.0.12 (X11/20070604) MIME-Version: 1.0 To: Oliver Jowett CC: pgsql-jdbc@postgresql.org Subject: Re: PSQLException: Too many update results were returned. References: <373352.78463.qm@web32701.mail.mud.yahoo.com> <46B3CBA0.3040203@opencloud.com> <46B3CDEB.2060608@gmail.com> <46B3CF4F.4020705@opencloud.com> In-Reply-To: <46B3CF4F.4020705@opencloud.com> X-Enigmail-Version: 0.94.2.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/26 X-Sequence-Number: 17339 Oliver Jowett wrote: > Albert László-Róbert wrote: > >> yes, the statements are semicolon-separated. than you have some idea how >> to make it to work? > > Try adding only one statement per addBatch() i.e. instead of > > stmt.addBatch("insert a; insert b; insert c"); > > do: > > stmt.addBatch("insert a"); > stmt.addBatch("insert b"); > stmt.addBatch("insert c"); i wish i can do that. the files that contains those statements are up to 500k ... and the majority of the code contain function implementations. exists some software that can extract these statements? > >> note: if i use a simple executeUpdate for multiple inserts that are >> semicolon-separated, than they work. > > Yes, executeUpdate is a different code path that does understand > semicolon-separated paths. > > The batch code expects exactly one command status per addBatch(). It's > not clear from the JDBC API what you're meant to do with an addBatch() > call that returns more than one thing, since executeBatch() is meant > to return one array element (representing the update status) per > addBatch() call AFAIK. > > -O > albertlr