Using "where col in (?)"

Поиск
Список
Период
Сортировка
От Blake McBride
Тема Using "where col in (?)"
Дата
Msg-id CABwHSOvV7bvKeuBy=Zz7R8jSgB4QVsxezPqotHZt=j00-rWhvg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Using "where col in (?)"
Re: Using "where col in (?)"
Список pgsql-jdbc
I am getting the following JDBC error:

ERROR: operator does not exist: integer = integer[]
Hint: No operator matches the given name and argument types. You might
need to add explicit type casts. Position: 37

My query looks like this:

select * from se_user where user_id in (?)

I am using a prepared statement.

I am doing:

Integer [] ary = new Integer[]{ 3, 4, 5 };
pstmt.setArray(1, conn.createArrayOf("integer", ary));

I also tried:

Integer [] ary = new Integer[]{ 3, 4, 5 };
pstmt.setObject(1, conn.createArrayOf("integer", ary));

Neither worked.  user_id is an integer column.

Sure appreciate some help.  

Thanks!

Blake McBride

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

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: BUG #17467: Perf degradation after switching to latest jdbc drivers
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: Using "where col in (?)"