Skip site navigation (1) Skip section navigation (2)

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 (view raw, whole thread or download thread mbox)
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?


In response to

pgsql-sql by date

Next:From: Shane AmblerDate: 2008-11-28 15:09:34
Subject: Re: wired behaviour
Previous:From: Lutz SteinbornDate: 2008-11-28 14:22:01
Subject: Re: wired behaviour

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group