Re: BUG #2889: Syntax error: WHERE ANY(arrayfield) = N

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #2889: Syntax error: WHERE ANY(arrayfield) = N
Дата
Msg-id 25968.1168713975@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #2889: Syntax error: WHERE ANY(arrayfield) = N  ("David" <higgsd@gmail.com>)
Ответы Re: BUG #2889: Syntax error: WHERE ANY(arrayfield) = N  ("David Higgs" <higgsd@gmail.com>)
Список pgsql-bugs
"David" <higgsd@gmail.com> writes:
> This statement works:
> => SELECT * FROM sal_emp WHERE 10000 = ANY (pay_by_quarter);

> But this does not:
> => SELECT * FROM sal_emp WHERE ANY (pay_by_quarter) = 10000;
> ERROR:  syntax error at or near "ANY" at character ...

This is not a bug, it's the way the syntax works per SQL spec.
ANY must immediately follow the operator it relates to.  See
<quantified comparison predicate> syntax in the spec.

            regards, tom lane

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

Предыдущее
От: "David"
Дата:
Сообщение: BUG #2889: Syntax error: WHERE ANY(arrayfield) = N
Следующее
От: "Rainer J. H. Brandt"
Дата:
Сообщение: "char" quoted in column information schema view