Re: JDBC support for CALL / PERFORM

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: JDBC support for CALL / PERFORM
Дата
Msg-id Pine.BSO.4.63.0602131759430.13231@leary.csoft.net
обсуждение исходный текст
Ответ на JDBC support for CALL / PERFORM  ("Guy Rouillier" <guyr@masergy.com>)
Список pgsql-interfaces

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

В списке pgsql-interfaces по дате отправления:

Предыдущее
От: "Guy Rouillier"
Дата:
Сообщение: JDBC support for CALL / PERFORM
Следующее
От: "Eric Chapdelaine"
Дата:
Сообщение: libpq - Unhandled Exception - Executing Samples under win32