Re: 回复:Re: The != and +/- signs are joined together as an operator

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: 谭忠涛 <zhongtao(dot)tan(at)seaboxdata(dot)com>
Cc: David G(dot) Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>, pgsql-bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: 回复:Re: The != and +/- signs are joined together as an operator
Date: 2025-03-20 01:44:43
Message-ID: 900145.1742435083@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"=?utf-8?B?6LCt5b+g5rab?=" <zhongtao(dot)tan(at)seaboxdata(dot)com> writes:
> But "!=" is not the same as "<>"
> 1!=-1, "!=-" as a whole is treated as an operator, not as an operator "!=" -1, but in 1<>-1, it is treated as "<>" -1 instead of "<>-" as a whole is treated as an operator
> I think "!=" and "<>" should be treated in the same way

[ shrug... ] It's not going to happen. The PG project's position,
as stated in the docs I pointed you to, is that you should write a
space between adjacent operators. The SQL spec thinks differently,
so we've made sure that you can leave out space between operators
that are defined in the SQL standard, but that's as far as we'll go.
There are too many existing operators, both within PG core and
elsewhere, that would be broken by changing those rules now.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2025-03-20 03:19:43 Re: BUG #18760: ../doc/src/sgml/postgres.sgml:24: element book: validity error : No declaration for attribute id of
Previous Message David G. Johnston 2025-03-20 01:32:58 Re: BUG #18760: ../doc/src/sgml/postgres.sgml:24: element book: validity error : No declaration for attribute id of