I wrote:
> The other three cases where we'd hit NaNs are likewise symmetric with
> non-NaN cases that'd return TRUE. Hence, I'm forced to the conclusion
> that you've got it right above. I might write the code a little
> differently, but const-TRUE-for-NaN-cases seems like the right behavior.
> So I withdraw my objection to defining it this way. Unless somebody
> else weighs in, I'll commit it like that in a day or two.
Pushed, but I chickened out of back-patching. The improvement in what
happens for finite comparison values seems somewhat counterbalanced by
the possibility that someone might not like the definition we arrived
at for infinities. So, it's not quite an open-and-shut bug fix, so
I just put it in HEAD (for now anyway).
regards, tom lane