Skip site navigation (1) Skip section navigation (2)

Re: When is a record NULL?

From: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: When is a record NULL?
Date: 2009-07-23 23:17:00
Message-ID: C2F66615-CC76-4BD5-A956-6BE7A5E4A5F6@kineticode.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Jul 23, 2009, at 4:08 PM, Tom Lane wrote:

> This is per SQL standard.  IS NULL is true if *all* the record's
> fields are null; IS NOT NULL is true if *none* of them are.
>
> Yeah, it's a bit dubious, but that's what they said.

And yet they're DISTINCT FROM each other if either or both contain  
NULLs and some other values? It seems to me that, to be consistent, it  
should be:

     select ROW(1, NULL) IS DISTINCT FROM ROW(2, NULL);
     ?column?
     ----------
     f

No?

Best,

David

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2009-07-23 23:22:37
Subject: Re: When is a record NULL?
Previous:From: Tom LaneDate: 2009-07-23 23:08:28
Subject: Re: When is a record NULL?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group