pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Rafia Sabih <rafia.pghackers@gmail.com>
Cc: jhecht@cirilgroup.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18689: psql : operator "!=" do not behave like "<>"
Date: Tue, 05 Nov 2024 09:56:22 -0500
Message-ID: <3048696.1730818582@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+FpmFfh6r4Zqae01SV1Sk0kNG9h0zaSeMTbsg6=6FS8VL6FFQ@mail.gmail.com>
References: <18689-7af3dd324b42205d@postgresql.org>
	<CA+FpmFfh6r4Zqae01SV1Sk0kNG9h0zaSeMTbsg6=6FS8VL6FFQ@mail.gmail.com>

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





view thread (4+ messages)  latest in thread

Message-ID: <3048696.1730818582@sss.pgh.pa.us>
Permalink:  ../3048696.1730818582@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3048696.1730818582@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, rafia.pghackers@gmail.com, jhecht@cirilgroup.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18689: psql : operator "!=" do not behave like "<>"
  In-Reply-To: <3048696.1730818582@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox