Re: When is a record NULL?

Поиск
Список
Период
Сортировка
От David E. Wheeler
Тема Re: When is a record NULL?
Дата
Msg-id 45BA8563-CF9A-40ED-80D5-31A9BB7FBA84@kineticode.com
обсуждение исходный текст
Ответ на Re: When is a record NULL?  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
On Jul 25, 2009, at 9:24 AM, Jeff Davis wrote:

> I don't think you want the "NOT x IS NULL" part at all -- that will
> evaluate to false when x = rec(NULL,NULL). I think you just want the  
> "x
> IS DISTINCT FROM NULL" part, right? Will that work?

Nope, infinite loop when because `ROW(null, null)` and `ROW()` are  
both distinct from null:

try=# select row(null, null) is distinct from null, row() is distinct  
from null; ?column? | ?column?
----------+---------- t        | t
(1 row)

So I still can't tell when I've exhausted a cursor.

Best,

David




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: autogenerating headers & bki stuff
Следующее
От: "David E. Wheeler"
Дата:
Сообщение: Re: When is a record NULL?