Search Postgresql Archives

Re: NOT NULL Issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tom Lane wrote:
"Gustav Lindenberg" <gustav.lindenberg@xxxxxxxxx> 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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux