Re: comparing NEW and OLD (any good this way?)

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: comparing NEW and OLD (any good this way?)
Date: 2009-08-12 18:45:34
Message-ID: 20090812184534.GZ5407@samason.me.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Aug 12, 2009 at 08:02:10PM +0200, Daniel Verite wrote:
>Sam Mason wrote:
> > But it seems to be a somewhat arbitrary choice to handle
> > IS NULL for rows differently from everything else.
>
> For scalar or array types, "is null" means that the value happens to be that
> special value that we call null. No conceptual problem here.
> But for rows, there is no such thing. You can't assign null to a row, it
> makes no sense and actually causes an error.

What makes you say this? There's no reason I can see that would cause
row values should be special in this way. Maybe if you could define
what you mean by "you can't assign null to a row"?

> Starting from that point, what consistency can we expect for the "is null"
> operator across row types and other types?

Values of row type are the only time when v IS NOT NULL and NOT v IS
NULL are not synonymous.

> > Yes, I understand what it's specified to do and that it's consistent
> > with SQL spec. I just think (and Merlin seems to agree) that the spec
> > has specified the "wrong" behavior.
>
> So for you guys, what would be the "right" behavior?

For me anyway, that the above actually holds true.

--
Sam http://samason.me.uk/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kelly Burkhart 2009-08-12 19:28:27 synchronous_commit and mvcc
Previous Message Daniel Verite 2009-08-12 18:02:10 Re: comparing NEW and OLD (any good this way?)