Re: Callable Statements - Mailing list pgsql-jdbc

From Nic Ferrier
Subject Re: Callable Statements
Date
Msg-id 87ptnvlu0d.fsf@pooh-sticks-bridge.tapsellferrier.co.uk
Whole thread Raw
In response to Re: Callable Statements  (floess@mindspring.com)
List pgsql-jdbc
floess@mindspring.com writes:

> Mark:
>
> To answer your question, you can't use CallableStatement where you
> return a row, rows or RECORD type.
>
> For a function returning multiple rows, a single row, or RECORD you
> would have to use a PreparedStatement.  The string passed to your
> prepared statement would resemble "select * from function"
>
> I don't have an example on hand...but I may be able to get one for
> you later.

To clarify, PostgreSQL JDBC has always been able to call functions
that return ref cursor types as ResultSet's. If you look through the
archives of this list you'll find plenty of examples (searching for
my name will provide at least one example).

CallableStatement support for such procs has recently been added to
the CVS version of PostgreSQL JDBC.


Nic

pgsql-jdbc by date:

Previous
From: Nic Ferrier
Date:
Subject: Re: Callable Statements
Next
From: floess@mindspring.com
Date:
Subject: Re: Callable Statements