Re: differences between <> and != when using signed values on the right hand side

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: differences between <> and != when using signed values on the right hand side
Дата
Msg-id 2111156.1715877290@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: differences between <> and != when using signed values on the right hand side  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-bugs
"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



В списке pgsql-bugs по дате отправления:

Предыдущее
От: Japin Li
Дата:
Сообщение: Re: BUG #18467: postgres_fdw (deparser) ignores LimitOption
Следующее
От: Andres Freund
Дата:
Сообщение: Re: relfrozenxid may disagree with row XIDs after 1ccc1e05ae