[Pljava-dev] Sample Code ResultSetHandle interface

From: chap at anastigmatix(dot)net (Chapman Flack)
To:
Subject: [Pljava-dev] Sample Code ResultSetHandle interface
Date: 2015-08-20 01:47:56
Message-ID: 55D531CC.4000404@anastigmatix.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

Hello,

Just to be sure I understand correctly....

1. Using PL/Java you have implemented the sample listSupers method,
and you have registered this as a PostgreSQL stored procedure,

2. It works, as shown by directly sending SELECT rte.listSupers()
to PostgreSQL,

3. You have a standalone Java program that makes a normal connection
to PostgreSQL (using the PostgreSQL JDBC driver?) and you want this
program to use the JDBC CallableStatement interface to call the
procedure you defined earlier.

It seems to me that (1) and (2) indicate you have done the PL/Java and
SQL parts correctly, and the question concerns the behavior of
CallableStatement as implemented in the PostgreSQL JDBC driver.

I am afraid the usefulness of my answer may end here, as I have no
experience using the CallableStatement JDBC interface myself. It seems
for most purposes you could equivalently (modulo some possible optimization)
use an ordinary Statement and the same SELECT statement that you confirmed
working in (2). Out of curiosity, does that work for you?

Have you had any better response raising the question on pgsql-jdbc ?

Regards,
-Chap

In response to

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Chapman Flack 2015-08-23 16:25:55 [Pljava-dev] Sample Code ResultSetHandle interface
Previous Message Thomas Hill 2015-08-16 10:51:52 [Pljava-dev] Sample Code ResultSetHandle interface