Search Postgresql Archives

how to pass an array to the plpgsql function from Java Code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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};
 
 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux