From: Guy Rouillier <guy-rouillier@speakeasy.net>
To: PostgreSQL JDBC <pgsql-jdbc@postgresql.org>
Subject: Calling stored functions in executeBatch
Date: Fri, 11 Mar 2005 19:21:34 -0500
Message-ID: <20050311192134.6aad0052@emach> (raw)
I've browsed the archives and understand that I am not supposed to
submit SELECT statements in batch. I'm converting some code from Oracle
that invokes stored procedures via batch (for high volume inserts.)
I've got the stored proc converted, but invoking in batch using "select
my_proc(x,y,z)" produces the predictable "result not expected", even
though my stored proc returns VOID.
Is there any way I can absorb the return value from the select to
prevent this error? I'd like to avoid rewriting this code as I want it
to continue to run with Oracle until I successfully sell the conversion
idea. I'm able to do this so far by changing the SQL statements to be
INVOKE + "my_proc(x,y,z)"
and then just setting INVOKE to either "call" or "select" for Oracle and
PostgreSQL, respectively. Will I run into the same problem if I change
these SQL statements to use the call escape format?
Thanks.
--
Guy Rouillier
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: guy-rouillier@speakeasy.net
Subject: Re: Calling stored functions in executeBatch
In-Reply-To: <20050311192134.6aad0052@emach>
References: <20050311192134.6aad0052@emach>
* 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