PostgreSQL - procedure - <failed to load> org.postgresql.jdbc4.Jdbc4ResultSet

I am not able to run PostgreSQL procedures from within DataGrip. The error I receive back is <failed to load> org.postgresql.jdbc4.Jdbc4ResultSet. All other selects/updates/inserts/deletes works fine on the Postgres database - just functions fail. The same functions work fine when called from psql. I have Auto-commit turned off.

Function:

CREATE or REPLACE FUNCTION availability.reffunc(refcursor) RETURNS refcursor AS '
BEGIN
OPEN $1 FOR SELECT col FROM availability.test;
RETURN $1;
END;
' LANGUAGE plpgsql;

Invoked:

BEGIN;
SELECT availability.reffunc('funccursor');
FETCH ALL IN funccursor;
COMMIT;

 Thanks!

1 comment
Comment actions Permalink

Hi,

There are similar issues:

It could help if you turn on Auto-commit option.

Thank you.

0

Please sign in to leave a comment.