Re: Sqlstatement with !=-1 fails

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: Sqlstatement with !=-1 fails
Дата
Msg-id 005801c150d4$d79c2d30$8201a8c0@inspiron
обсуждение исходный текст
Ответы Re: Sqlstatement with !=-1 fails  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hello,

I get the following error

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

pl=# select * from person where id =-1;
 id | name | last_update_time
----+------+------------------
(0 rows)

However this works fine

pl=# select * from person where id != -1;

This looks like a parser error, note the space added in the select that
works ??

Dave


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

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