how to pass an array to the plpgsql function from Java Code - Mailing list pgsql-general

From Sandeep Kumar Jakkaraju
Subject how to pass an array to the plpgsql function from Java Code
Date
Msg-id c653c98f0703040834he6ec066je10e8c58abf8755a@mail.gmail.com
Whole thread Raw
Responses Re: how to pass an array to the plpgsql function from Java Code  ("ksherlock@gmail.com" <ksherlock@gmail.com>)
List pgsql-general
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};
 
 

pgsql-general by date:

Previous
From: "Nikolay Samokhvalov"
Date:
Subject: Re: xpath and xml namespaces
Next
From: Don Lavelle
Date:
Subject: Cannot digest subscribe