Re: Wrong results from in_range() tests with infinite offset - Mailing list pgsql-hackers

From Dean Rasheed
Subject Re: Wrong results from in_range() tests with infinite offset
Date
Msg-id CAEZATCVXfxCR+2gCSwFMQPfyFUVNzY7U6oHfCfjD1OCCVfWUiQ@mail.gmail.com
Whole thread Raw
In response to Re: Wrong results from in_range() tests with infinite offset  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Wrong results from in_range() tests with infinite offset
List pgsql-hackers
On Thu, 16 Jul 2020, 22:50 Tom Lane, <tgl@sss.pgh.pa.us> wrote:
I wrote:
> When the current row's value is +infinity, actual computation of
> base - offset would yield NaN, making it a bit unclear whether
> we should consider -infinity to be in-range.  It seems to me that
> we should, as that gives more natural-looking results in the test
> cases, so that's how the patch does it.

Actually, after staring at those results awhile longer, I decided
they were wrong.  The results shown here seem actually sane ---
for instance, -Infinity shouldn't "infinitely precede" itself,
I think.  (Maybe if you got solipsistic enough you could argue
that that is valid, but it seems pretty bogus.)

Hmm, that code looks a bit fishy to me, but I really need to think about it some more. I'll take another look tomorrow, and maybe it'll become clearer.

Regards,
Dean

pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: psql FETCH_COUNT feature does not work with combined queries
Next
From: Michael Paquier
Date:
Subject: Re: TAP tests and symlinks on Windows