CREATE OR REPLACE FUNCTION words_merge_users( IN in_users jsonb, IN in_ip inet, OUT out_uid integer) RETURNS integer AS $func$ ............... $func$ LANGUAGE plpgsql;
Which I can successfully call at psql 9.5.3 prompt:
# SELECT out_uid FROM words_merge_users('[{"sid":"abcde","auth":"xxxx","social":2,"given":"Abcde2","female":0,"stamp":1450102880}]'::jsonb, '0.0.0.0'::inet);
out_uid --------- 1 (1 row)
However an SQLException is thrown, when trying to call the same function via JDBC driver 9.4.1208.jre7:
ERROR: function words_merge_users(character varying, character varying) does not exist Hint: No function matches the given name and argument types. You might need to add explicit type casts.
Being a JDBC newbie I wonder, how to perform the call properly in Java?
PreparedStatement st = mDatabase.prepareStatement("SELECT out_uid FROM words_merge_users(?, ?)");