On Wed, 22 Dec 2004, Jerome Colombie wrote:
> Thanks you very much for your help. It works perfectly now. I just
> wonder why it didn't work with the callable statement. In my opinion it
> should also work with the procedure call, since it is a stored
Postgresql doesn't really support stored procedures, only functions. In
time this function support was hacked to return sets, but it is not really
true stored procedure support. Notably from the caller's perspective how
can you tell what the difference is between a function that returns an int
and a function that returns a setof int, but returns only one row. In
both cases you get a one row, one column result. In the first case
CallableStatement.getObject should return Integer, but in the second case
you're suggesting it should return ResultSet. I'm unclear on how to make
this determination in the client.
> works perfectly, but according to an O'Reilly Article
> the callable statement should also work, but maybe this is obsolete now.
This examples shows returning a refcursor, not a setof <type>. This does
work, and is different because a refcursor is a single scalar value (a
cursor name) that may then be transformed into a true ResultSet.
In response to
pgsql-jdbc by date
|Next:||From: Oliver Jowett||Date: 2004-12-22 20:27:32|
|Subject: Re: [BUGS] BUG #1347: Bulk Import stopps after a while (|
|Previous:||From: Kris Jurka||Date: 2004-12-22 19:38:28|
|Subject: Re: Bug in JDBC-Driver?|