Re: Sqlstatement with !=-1 fails

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Sqlstatement with !=-1 fails
Дата
Msg-id 3605.1002645185@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Sqlstatement with !=-1 fails  ("Dave Cramer" <Dave@micro-automation.net>)
Список pgsql-general
"Dave Cramer" <Dave@micro-automation.net> writes:
> pl=# select * from person where id !=-1;
> ERROR:  Unable to identify an operator '!=-' for types 'int8' and 'int4'
>         You will have to retype this query using an explicit cast

This is not a bug.  It's a consequence of wanting to allow user-definable
multicharacter operator names.  See the rules about allowable operator
names,
http://www.ca.postgresql.org/users-lounge/docs/7.1/postgres/sql-syntax.html#SQL-SYNTAX-OPERATORS

            regards, tom lane

PS: no, != is not an SQL-standard operator name ... <> is.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: ERROR: cannot insert duplicate... on VACUUM ANALYZE
Следующее
От: Jon Lapham
Дата:
Сообщение: Re: ERROR: cannot insert duplicate... on VACUUM ANALYZE