"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Thursday, May 16, 2024, David Hunnisett <david.hunnisett@probit.io>
> wrote:
>> When using a signed comparison != does not behave like <> if the right
>> hand side comparator is signed and there is no space between the comparator
>> and the sign
> This is not a bug. You are seeing practical examples of the behavior
> documented here:
> https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-OPERATORS
Yeah, it would probably have been better to forbid multicharacter
operator names that end in '+' or '-'. But that ship sailed a long
time ago, so we have this kluge to (effectively) allow it only if
the operator can't be a SQL-standard one. Thus, in the example
"!=-" is being read as a single operator name.
regards, tom lane