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

Поиск
Список
Период
Сортировка
От ksherlock@gmail.com
Тема Re: how to pass an array to the plpgsql function from Java Code
Дата
Msg-id 1173126928.941993.56790@t69g2000cwt.googlegroups.com
обсуждение исходный текст
Ответ на how to pass an array to the plpgsql function from Java Code  ("Sandeep Kumar Jakkaraju" <sandeepkumar.jakkaraju@gmail.com>)
Список pgsql-general
On Mar 4, 11:34 am, sandeepkumar.jakkar...@gmail.com ("Sandeep Kumar
Jakkaraju") wrote:
> how to pass an array to the plpgsql function from Java Code ??

If nothing else, you could use the ARRAY[] constructor:

int [] ar = {1,2,3};
PreparedStament pre= connection.prepareStatement( " select
test(ARRAY[?,?,?]) ");

pre.setArray(1,ar[0]);
pre.setArray(2,ar[1]);
pre.setArray(3,ar[2]);




В списке pgsql-general по дате отправления:

Предыдущее
От: "lissette"
Дата:
Сообщение: Postgres ebmail and hermes
Следующее
От: Andy
Дата:
Сообщение: Re: Importing *huge* mysql database into pgsql