Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id D853B9FB560 for ; Mon, 5 Mar 2007 12:10:18 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 19259-05 for ; Mon, 5 Mar 2007 12:09:59 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by postgresql.org (Postfix) with SMTP id 1F3119FB694 for ; Mon, 5 Mar 2007 12:09:58 -0400 (AST) Received: (qmail 26130 invoked from network); 5 Mar 2007 16:09:58 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.14?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 5 Mar 2007 16:09:58 -0000 In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <1704D65B-2866-4FAB-8EE6-E8017A01EE7D@fastcrypt.com> Cc: List Content-Transfer-Encoding: 7bit From: Dave Cramer Subject: Re: Utilizing executeBatch() with stored procedures Date: Mon, 5 Mar 2007 11:10:07 -0500 To: Guy Rouillier , Kris Jurka X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/29 X-Sequence-Number: 16743 Guy, Kris, What was the suggested fix ? Dave On 30-Jun-06, at 12:37 PM, Guy Rouillier wrote: > Yukino Miyazawa wrote: >> I was wondering what the status is for getting CallableStatments to >> run via executeBatch() to get inserts done in bulk. I've been >> attempting to get this to work on 8.1.4 with the 8.2 503 driver. >> Despite my return type being void, this fails to execute returning a >> syntax error on "{" which is alluding to the "{call func(? . . ." >> >> Are there any known workarounds? > > I've tried this myself and didn't get a syntax error. However, > invoking > stored functions in executeBatch currently does not work. Even though > you use "call func" in your SQL command, the PostgreSQL JDBC driver > maps > this to "select func" because that is what PG requires. Now, even > though your stored function returns void, the result of a select is > always a ResultSet, empty in this case. But that is enough to cause > executeBatch to generate an error complaining that no return value is > allowed. > > I discussed with Kris Jurka a way to address this issue, but I haven't > had time to try his solution yet. > > -- > Guy Rouillier > > > ---------------------------(end of > broadcast)--------------------------- > TIP 6: explain analyze is your friend >