Re: NOT NULL Issue

From: Geoffrey Myers <geof(at)serioustechnology(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: NOT NULL Issue
Date: 2007-09-15 11:24:26
Message-ID: 46EBC0EA.6080001@serioustechnology.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
> "Gustav Lindenberg" <gustav(dot)lindenberg(at)gmail(dot)com> writes:
>> Why is '' not considered null is postgres (8.1.3)
>
> Because they're different. The SQL spec says that an empty string
> is different from NULL, and so does every database in the world except
> Oracle. Oracle, however, does not define the standard.

If people would think of it in terms of an address it might make more
sense to them. An empty string has an address, so can a string, integer
and so on. When you think of NULL, think of it in the context of a NULL
address. It's not addressable, it's nothing, it's not set, it's not
there. I know it's not 100% accurate, but I think it helps folks
understand the concept.

--
Until later, Geoffrey

Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety.
- Benjamin Franklin

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message rihad 2007-09-15 11:45:02 strange TIME behaviour
Previous Message Pavel Stehule 2007-09-15 09:04:15 Re: getting min/max of two values