Trouble with CallableStatement - Mailing list pgsql-jdbc

From Michael Guyver
Subject Trouble with CallableStatement
Date
Msg-id 30b57570607230427g2e53ead8uae03cc366eccb334@mail.gmail.com
Whole thread Raw
In response to Trouble with CallableStatement  ("Michael Guyver" <kenevel@googlemail.com>)
Responses Re: Trouble with CallableStatement
List pgsql-jdbc
Hi there,

Having followed Adam's advice and prevented the original error by
upgrading the Jar to
8.1-407, I now get a different exception. For the same function:

CREATE OR REPLACE FUNCTION pro_register_cookie_for_user(
   prmUserId int8,
   prmSecureGuid varchar,
   OUT outUsernameHash varchar,
   OUT outMaxAge float4)
AS $$
...
$$ LANGUAGE plpgsql;

I now get the following error:

org.postgresql.util.PSQLException: No results were returned by the query.
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:259)

This is caused by the AbstractJdbc2Statement.executeWithFlags(int)
method returning false for any code path which satisfies the condition
(isFunction && returnTypeSet).

This appears to be at best mis-reported as I can clearly see the
results being read into the  abstractJdbc2Statement.callResult
instance variable.

Is this right?

Michael

pgsql-jdbc by date:

Previous
From: Markus Schaber
Date:
Subject: Re: please help
Next
From: "Michael Guyver"
Date:
Subject: Re: Trouble with CallableStatement