how to pass an array to the plpgsql function from Java Code ??
say from a JDBC preparedStatement ....


Example :-

create or replace function test( x integer[] ) returns integer as
$BODY$
BEGIN
RETURN x[0];
END ;
language 'plpgsql'

JDBC CODE :-


int [] ar = {1,2,3};

PreparedStament pre= connection.prepareStatement( " select test(?) ");

pre.setArray(1,ar};

Reply via email to