Re: ERROR: operator does not exist: integer !=- integer - Mailing list pgsql-hackers

From Joshua D. Drake
Subject Re: ERROR: operator does not exist: integer !=- integer
Date
Msg-id 45EB1515.5070103@commandprompt.com
Whole thread Raw
In response to Re: ERROR: operator does not exist: integer !=- integer  (Shane Ambler <pgsql@Sheeky.Biz>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: New Access Method
Next
From: "Luke Lonergan"
Date:
Subject: Bug: Buffer cache is not scan resistant