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