Re: When is a record NULL?

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "David E(dot) Wheeler" <david(at)kineticode(dot)com>, Brendan Jurd <direvus(at)gmail(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: When is a record NULL?
Date: 2009-07-24 18:49:51
Message-ID: b42b73150907241149n2fd65c9dqb9eed70e5b3eca0b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jul 24, 2009 at 2:05 PM, Tom Lane<tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Merlin Moncure <mmoncure(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bernd Helmle 2009-07-24 18:50:16 Re: bytea vs. pg_dump
Previous Message Jeff Davis 2009-07-24 18:37:13 Re: When is a record NULL?