Re: Callable Statements

From: Nic Ferrier <nferrier(at)tapsellferrier(dot)co(dot)uk>
To: floess(at)mindspring(dot)com
Cc: Mark French <frenchmb(at)tpg(dot)com(dot)au>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Callable Statements
Date: 2003-04-09 12:45:06
Message-ID: 87ptnvlu0d.fsf@pooh-sticks-bridge.tapsellferrier.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

floess(at)mindspring(dot)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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message floess 2003-04-09 12:51:37 Re: Callable Statements
Previous Message Nic Ferrier 2003-04-09 12:42:26 Re: Callable Statements