Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id DD4CA47620C for ; Wed, 15 Jan 2003 23:20:29 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 06B6D4761BB for ; Wed, 15 Jan 2003 23:20:23 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id h0G4KN5u011446; Wed, 15 Jan 2003 23:20:23 -0500 (EST) To: Peter Eisentraut Cc: dev@archonet.com, pgsql-sql@postgresql.org Subject: Re: RFC: A brief guide to nulls In-reply-to: References: Comments: In-reply-to Peter Eisentraut message dated "Thu, 16 Jan 2003 00:44:55 +0100" Date: Wed, 15 Jan 2003 23:20:22 -0500 Message-ID: <11445.1042690822@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/249 X-Sequence-Number: 11114 Peter Eisentraut 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