Re: BUG #18689: psql : operator "!=" do not behave like "<>" - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #18689: psql : operator "!=" do not behave like "<>"
Date
Msg-id 3048696.1730818582@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #18689: psql : operator "!=" do not behave like "<>"  (Rafia Sabih <rafia.pghackers@gmail.com>)
List pgsql-bugs
Rafia Sabih <rafia.pghackers@gmail.com> writes:
> Thank you for reporting this. However I found that the lack of space in the
> statement is causing this.
> On trying it like select -1 != -1; it works fine.

Right, see

https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-OPERATORS

particularly the bit about "A multiple-character operator name cannot
end in + or -, unless ...".  "!=-" will be treated as one operator,
but "<>-" will not.

            regards, tom lane



pgsql-bugs by date:

Previous
From: Rafia Sabih
Date:
Subject: Re: BUG #18689: psql : operator "!=" do not behave like "<>"
Next
From: Erik Wienhold
Date:
Subject: Re: BUG #18689: psql : operator "!=" do not behave like "<>"