Re: ERROR: operator does not exist: integer !=- integer

Поиск
Список
Период
Сортировка
От Joshua D. Drake
Тема Re: ERROR: operator does not exist: integer !=- integer
Дата
Msg-id 45EB1515.5070103@commandprompt.com
обсуждение исходный текст
Ответ на Re: ERROR: operator does not exist: integer !=- integer  (Shane Ambler <pgsql@Sheeky.Biz>)
Список pgsql-hackers
>
> I missed the first post and can't seem to search for it - so correct 
> me if I am missing something.
>
> Isn't the problem here a missing space? != is a valid operator and -1 
> is the value you are comparing to. !=-1 is not valid but != -1 is 
> correct and what I assume you are looking to achieve.
>

Well yes it will work if you add a space, but technically the problem is 
the query should be written like this:

1 <>-1 or 1 <> -1

Joshua D. Drake



> The negation operator goes with the int being negated and is not part 
> of the comparison operator != the space is needed there to separate 
> the two.
>
>
>



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: New Access Method
Следующее
От: "Luke Lonergan"
Дата:
Сообщение: Bug: Buffer cache is not scan resistant