From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Bhuvan A <bhuvansql@yahoo.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re:
Date: Mon, 11 Mar 2002 09:02:09 -0800 (PST)
Message-ID: <20020311085824.C45259-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <Pine.LNX.4.20.0203111553400.3514-100000@Larry>
On Mon, 11 Mar 2002, Bhuvan A wrote:
> > If you compare a NULL with anything you don't get a true value whether
> > you're comparing with =, !=, <, >, etc... That's how it's defined to
> > behave.
>
> where did you get this definition of behaviour!? is it applicable only to
> postgres or ..? its quite strange yaar!
It makes sense if you think of NULL as an unknown value. You don't know
if this unknown value is different from any particular value (even another
NULL). NULLs are one of the ugliest parts of SQL.
In case you're wondering for SQL92 (at least the draft I have), the
section is 8.2 <comparison predicate>, General Rules 1.
1) Let X and Y be any two corresponding <row value constructor
element>s. Let XV and YV be the values represented by X and Y,
respectively.
Case:
a) If XV or YV is the null value, then "X <comp op> Y" is un-
known.
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-bugs@postgresql.org
Cc: sszabo@megazone23.bigpanda.com, bhuvansql@yahoo.com
Subject: Re:
In-Reply-To: <20020311085824.C45259-100000@megazone23.bigpanda.com>
References: <Pine.LNX.4.20.0203111553400.3514-100000@Larry> <20020311085824.C45259-100000@megazone23.bigpanda.com>
* 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