On Wed, 15 Dec 2004, Eli Bingham wrote:
> In regards to the specific solution that you offer above with a
> function that creates row objects, would it be possible to invoke a
> composed function via a CallableStatement in Postgres JDBC, like this:
>
> CallableStatement proc = conn.prepareCall ("{ ? = call do_stuff
> (create_foobar (?, ?)) }");
> proc.registerOutParameter (1, Types.INTEGER);
> proc.setObject (2, x);
> proc.setObject (3, y);
>
Yes, this should work fine, behind the scenes the driver rewrites
{? = call func(?)}
into:
SELECT * FROM func(?);
So you should be able to test what a CallableStatement will do directly in
SQL.
Kris Jurka