Re: wired behaviour

From: Ragnar Hafstað <gnari(at)simnet(dot)is>
To: Lutz Steinborn <l(dot)steinborn(at)4c-ag(dot)de>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: wired behaviour
Date: 2008-11-28 14:54:35
Message-ID: 1227884075.32212.16.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


On fös, 2008-11-28 at 15:22 +0100, Lutz Steinborn wrote:
> Hello Paul,
>
> thanks for the quick answer.
>
> > NULL values?
> Jepp, thats it.
> I've supposed this but can't believe it. So NULL is something out of this
> dimension :-)

Yes, that is one way of putting it.

A more useful way to look at it is to say that NULL represents an
UNKNOWN value.

rows with NULL bar value will not be counted by:

> > select count(*) from foo where bar = 'Mr Spock';

because you cannot know whether the UNKNOWN value is 'Mr Spock'.

these rows will neither be counted by:
> > select count(*) from foo where NOT bar = 'Mr Spock';

because you also cannot know that the UNKNOWN value is NOT 'Mr Spock'.

Does that make it any clearer?

gnari

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Shane Ambler 2008-11-28 15:09:34 Re: wired behaviour
Previous Message Lutz Steinborn 2008-11-28 14:22:01 Re: wired behaviour