Re: the IN clause saga

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: the IN clause saga
Дата
Msg-id 3F1DFF48.2000905@joeconway.com
обсуждение исходный текст
Ответ на Re: the IN clause saga  (Kris Jurka <books@ejurka.com>)
Список pgsql-jdbc
Kris Jurka wrote:
> Perhaps these cases would also be illustrative as I believe that is what
> Fernando was suggesting.
>
> template1=# select 1 where 1 in (array[1,2,3]);
> ERROR:  Unable to identify an operator '=' for types 'integer' and 'integer[]'
>         You will have to retype this query using an explicit cast
> IN:  op_error (parse_oper.c:608)
> ERROR:  Unable to identify an operator '=' for types 'integer' and 'integer[]'
>         You will have to retype this query using an explicit cast

Right, as I said, this syntax is trying to compare the scalar value to
the entire array value, not its elements.

> template1=# select 1 where 1 in ([1,2,3]);
> ERROR:  syntax error at or near "["
> IN:  yyerror (scan.l:596)
> ERROR:  syntax error at or near "[" at character 22

And this syntax was never valid and still isn't.

Joe


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

Предыдущее
От: Barry Lind
Дата:
Сообщение: Re: Statement.executeQuery() and no results
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: patch: support user implementations of Array in setArray()