Re: RFC: A brief guide to nulls

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: RFC: A brief guide to nulls
Дата
Msg-id 11445.1042690822@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: RFC: A brief guide to nulls  (Peter Eisentraut <peter_e@gmx.net>)
Список 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 по дате отправления:

Предыдущее
От: "Matthew Nuzum"
Дата:
Сообщение: Re: show data from two tables together
Следующее
От: Rudi Starcevic
Дата:
Сообщение: pg_dump problem