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

From: Shane Ambler <pgsql(at)Sheeky(dot)Biz>
To: andrew(at)supernews(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: ERROR: operator does not exist: integer !=- integer
Date: 2007-03-04 15:56:38
Message-ID: 45EAEC36.8040901@Sheeky.Biz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew - Supernews wrote:
> On 2007-03-04, William ZHANG <uniware(at)zedware(dot)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(at)Sheeky(dot)Biz

Get Sheeky @ http://Sheeky.Biz

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nikolay Samokhvalov 2007-03-04 16:29:07 Re: xpath_array with namespaces support
Previous Message Martijn van Oosterhout 2007-03-04 15:49:49 Re: UPSERT