Re: Using "where col in (?)"

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Using "where col in (?)"
Дата
Msg-id CAKFQuwYPUAE_K7OO=PfPVXvEE7S97bJBu4XnjWw8b86EQrvMvQ@mail.gmail.com
обсуждение исходный текст
Ответ на Using "where col in (?)"  (Blake McBride <blake1024@gmail.com>)
Ответы Re: Using "where col in (?)"
Re: Using "where col in (?)"
Список pgsql-jdbc
On Fri, Apr 29, 2022 at 8:25 AM Blake McBride <blake1024@gmail.com> wrote:
I am getting the following JDBC error:

The error is a PostgreSQL one, JDBC is just the messenger here.
 

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 

select * from se_user where user_id in (?)


Why are you expecting: "integer IN (integer[])" to work?  It isn't documented anywhere that I'm aware of.

You can write that as: "integer = ANY(integer[])" though, that is documented.
David J.

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

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: Using "where col in (?)"
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: Using "where col in (?)"