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

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Shane Ambler <pgsql(at)Sheeky(dot)Biz>
Cc: andrew(at)supernews(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: ERROR: operator does not exist: integer !=- integer
Date: 2007-03-04 18:51:01
Message-ID: 45EB1515.5070103@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.
>
>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Luke Lonergan 2007-03-04 19:11:26 Bug: Buffer cache is not scan resistant
Previous Message Tom Lane 2007-03-04 18:48:08 Re: New Access Method