Re: RFC: A brief guide to nulls - Mailing list pgsql-sql

From Tom Lane
Subject Re: RFC: A brief guide to nulls
Date
Msg-id 11445.1042690822@sss.pgh.pa.us
Whole thread Raw
In response to Re: RFC: A brief guide to nulls  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-sql
Peter Eisentraut <peter_e@gmx.net> writes:
> dev@archonet.com writes:
>> A null is *not* a value.
>> A null is *not* a "special" value.
>> A null is the absence of a value.

> A quotation directly from the SQL standard:
>     Every data type includes a special value, called the null value,
> This seems to directly contradict those three statements.

I think you can look at it either way.  The traditional mathematical
approach to this sort of thing has been to consider that every data
type includes an "undefined" value (sometimes called "bottom", often
written as an upside-down T).  But the specific semantics assigned to
this concept in SQL definitely correspond to the idea that there's
a missing data entry.  And those who like to think about the bits prefer
to imagine a separate "its-null" flag bit, as someone else noted in this
thread.

The real bottom line is that the language provides you with a concept
"NULL" that has very specific (and less than intuitive) semantics.
To make use of this concept in your application, you have to interpret
it in a way that is useful for your application --- and doesn't conflict
with the SQL-defined semantics.
        regards, tom lane


pgsql-sql by date:

Previous
From: "Matthew Nuzum"
Date:
Subject: Re: show data from two tables together
Next
From: Rudi Starcevic
Date:
Subject: pg_dump problem