From: Dave Cramer <pg@fastcrypt.com>
To: Guy Rouillier <guyr@masergy.com>
To: Kris Jurka <books@ejurka.com>
Cc: List <pgsql-jdbc@postgresql.org>
Subject: Re: Utilizing executeBatch() with stored procedures
Date: Mon, 5 Mar 2007 11:10:07 -0500
Message-ID: <1704D65B-2866-4FAB-8EE6-E8017A01EE7D@fastcrypt.com> (raw)
In-Reply-To: <D4D1632DC736E74AB95FE78CD609007901275F@mtxexch01.add0.masergy.com>
References: <D4D1632DC736E74AB95FE78CD609007901275F@mtxexch01.add0.masergy.com>
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
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: pg@fastcrypt.com, guyr@masergy.com, books@ejurka.com
Subject: Re: Utilizing executeBatch() with stored procedures
In-Reply-To: <1704D65B-2866-4FAB-8EE6-E8017A01EE7D@fastcrypt.com>
References: <D4D1632DC736E74AB95FE78CD609007901275F@mtxexch01.add0.masergy.com> <1704D65B-2866-4FAB-8EE6-E8017A01EE7D@fastcrypt.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox