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

From David E. Wheeler
Subject Re: When is a record NULL?
Date
Msg-id AD0542DC-FC37-40A1-8450-38EE82B37892@kineticode.com
Whole thread Raw
In response to When is a record NULL?  ("David E. Wheeler" <david@kineticode.com>)
List pgsql-hackers
On Jul 23, 2009, at 3:19 PM, David E. Wheeler wrote:

> How can a record be neither NULL or NOT NULL?
>
>    try=# select ROW(1, NULL) IS NULL;
>     ?column?
>    ----------
>     f
>    (1 row)
>
>    try=# select ROW(1, NULL) IS NOT NULL;
>     ?column?
>    ----------
>     f
>    (1 row)
>
> This makes it rather hard to tell, in PL/pgSQL, when I've fetched
> the last record from a cursor…

Also:

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

As expected, but the IS NULL above is not expected (by this bunny,
anyway).

Best,

David



pgsql-hackers by date:

Previous
From: James Pye
Date:
Subject: WIP: plpython3
Next
From: Jeff Davis
Date:
Subject: Re: When is a record NULL?