From: Kris Jurka <books@ejurka.com>
To: Guy Rouillier <guyr@masergy.com>
Cc: PostgreSQL Interfaces <pgsql-interfaces@postgresql.org>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: JDBC support for CALL / PERFORM
Date: Mon, 13 Feb 2006 18:02:42 -0500 (EST)
Message-ID: <Pine.BSO.4.63.0602131759430.13231@leary.csoft.net> (raw)
In-Reply-To: <CC1CF380F4D70844B01D45982E671B230137A6C0@mtxexch01.add0.masergy.com>
References: <CC1CF380F4D70844B01D45982E671B230137A6C0@mtxexch01.add0.masergy.com>
On Mon, 13 Feb 2006, Guy Rouillier wrote:
> I have some Java code that I'm trying to convert from Oracle to PG.
> This code uses the JDBC batch functionality to submit batches of stored
> procedures invocations using the "call" syntax. I implemented the same
> stored functions in PG, having them return void. I converted the batch
> statements to use "select" with these stored functions. Even though the
> stored functions return void, the select is still producing a result
> set, and JDBC does not allow results with batches.
>
> I'd like to take a crack at adding CALL (for Oracle and general JDBC
> compatibility) and/or PERFORM (for PL/SQL compatibility) to the JDBC
> driver. My approach would be to simply substitute SELECT, then discard
> the result set upon completion.
You shouldn't need to do anything other than discard the results instead
of erroring for CallableStatement batches. You shouldn't do any messing
with the SQL and CALL or PERFORM. This should be handled by the standard
{call } syntax.
Also JDBC messages should go to the jdbc list, pgsql-jdbc@postgresql.org.
Kris Jurka
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 using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: books@ejurka.com, guyr@masergy.com, pgsql-jdbc@postgresql.org
Subject: Re: JDBC support for CALL / PERFORM
In-Reply-To: <Pine.BSO.4.63.0602131759430.13231@leary.csoft.net>
* 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