Re: BUG #15297: Irregular comparison rules for NULLs in tuples

Поиск
Список
Период
Сортировка
От Raphael 'kena' Poss
Тема Re: BUG #15297: Irregular comparison rules for NULLs in tuples
Дата
Msg-id 94ffed23-67eb-3eac-e08e-5d4bf5287d8d@thaumogen.net
обсуждение исходный текст
Ответ на Re: BUG #15297: Irregular comparison rules for NULLs in tuples  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #15297: Irregular comparison rules for NULLs in tuples  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Op 26-07-18 om 10:03 schreef Tom Lane:
>> "select (1, (1, NULL::int)) > (1, (1, 2))"  -> returns true !?
> 
> We insist on non-null record values being totally ordered, because without
> that you can't build a working btree opclass for them.  So the general
> principle for comparing corresponding fields in two records is that nulls
> sort after non-nulls and two nulls are treated as equal.

I'd really like this to be true (I like it, it's simple) but then how do
you explain that row(1, null) > row(1, 2) is NULL, and not true? both
sides are record values and they are not null, after all.

-- 
Raphael 'kena' Poss


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #15297: Irregular comparison rules for NULLs in tuples
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #15297: Irregular comparison rules for NULLs in tuples