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

From Shane Ambler
Subject Re: ERROR: operator does not exist: integer !=- integer
Date
Msg-id 45EAEC36.8040901@Sheeky.Biz
Whole thread Raw
In response to Re: ERROR: operator does not exist: integer !=- integer  (Andrew - Supernews <andrew+nonews@supernews.com>)
Responses Re: ERROR: operator does not exist: integer !=- integer  ("Joshua D. Drake" <jd@commandprompt.com>)
List pgsql-hackers
Andrew - Supernews wrote:
> On 2007-03-04, William ZHANG <uniware@zedware.org> wrote:
>> Here is the steps to reproduce it in CVS HEAD:
>> backend> select -1 !=-1;
> 
> This arguably isn't a bug, because != is not a standard SQL operator, and
> therefore !=- can legitimately be defined as a single operator by the user.
> 

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.

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.



-- 

Shane Ambler
pgSQL@Sheeky.Biz

Get Sheeky @ http://Sheeky.Biz


pgsql-hackers by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: UPSERT
Next
From: Ryan Cumming
Date:
Subject: Trivial HugeTLB Benchmark