From: Tom Lane <tgl@sss.pgh.pa.us>
To: Patrik Kudo <kudo@partitur.se>
Cc: pgsql-sql@postgresql.org
Subject: Re: != and <> operators
Date: Tue, 13 Mar 2001 10:04:12 -0500
Message-ID: <19227.984495852@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.BSF.4.31.0103130813320.6873-100000@tb303.partitur.se>
References: <Pine.BSF.4.31.0103130813320.6873-100000@tb303.partitur.se>
Patrik Kudo <kudo@partitur.se> writes:
> I've for a while now been using the != operator in my sql queries, but in
> almost all examples I see <> instead. Are there any good reason to use
> any instead of the other? I prefer !=, but if you convince me, I'll change to
> what you other guys are using ;-)
"<>" is the SQL-standard name, and also the internal name of all these
operators. There is a hardwired hack in the lexer to convert != to <>.
So write whichever you feel like, but <> is what you'll see in dumps and
so forth ...
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, kudo@partitur.se
Subject: Re: != and <> operators
In-Reply-To: <19227.984495852@sss.pgh.pa.us>
References: <Pine.BSF.4.31.0103130813320.6873-100000@tb303.partitur.se> <19227.984495852@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