Re: When is a record NULL? - Mailing list pgsql-hackers

From Merlin Moncure
Subject Re: When is a record NULL?
Date
Msg-id b42b73150907241149n2fd65c9dqb9eed70e5b3eca0b@mail.gmail.com
Whole thread Raw
In response to Re: When is a record NULL?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: When is a record NULL?
List pgsql-hackers
On Fri, Jul 24, 2009 at 2:05 PM, Tom Lane<tgl@sss.pgh.pa.us> wrote:
> Merlin Moncure <mmoncure@gmail.com> writes:
>> I think the following should _not_ return true:
>> select (null, null)::somerowtype is null;
>
> Take it up with the SQL standards committee.  The spec is 100% not
> ambiguous about this.

I'm not proposing to change the current behavior...just playing
devil's advocate here.  Still, why:

*) is select null::foo is distinct from (null, null)::foo; true?
(null should not be distinct from null)

*) does (null, null) allow STRICT functions to execute?

*) is (null, null)::text not null?

The upshot of this is that 'is null' really means 'is approximately
null', or our handling of the three above cases is wrong.  Or put
another way, I'd like a clarification:

is (null, null) really null (in which case I'd say our handling of it
is out of standard), or just a special case for the IS NULL operator,
so that it returns null but in all other respect not null?  ISTM you
can't have it both ways.

merlin


pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: When is a record NULL?
Next
From: Bernd Helmle
Date:
Subject: Re: bytea vs. pg_dump