Re: NOT NULL Issue - Mailing list pgsql-general

From Geoffrey Myers
Subject Re: NOT NULL Issue
Date
Msg-id 46EBC0EA.6080001@serioustechnology.com
Whole thread Raw
In response to Re: NOT NULL Issue  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: NOT NULL Issue
List pgsql-general
Tom Lane wrote:
> "Gustav Lindenberg" <gustav.lindenberg@gmail.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

pgsql-general by date:

Previous
From: Sascha Bohnenkamp
Date:
Subject: Re: keeping 3 tables in sync w/ each other
Next
From: Ow Mun Heng
Date:
Subject: help w/ SRF function