From: | "Guy Rouillier" <guyr(at)masergy(dot)com> |
---|---|
To: | <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: Utilizing executeBatch() with stored procedures |
Date: | 2006-06-30 16:37:52 |
Message-ID: | D4D1632DC736E74AB95FE78CD609007901275F@mtxexch01.add0.masergy.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
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
From | Date | Subject | |
---|---|---|---|
Next Message | CG | 2006-06-30 19:43:35 | Re: Custom type woes |
Previous Message | Kris Jurka | 2006-06-30 16:23:10 | Re: ResultSetMetaData + CachedResultSet bug |