Re: compress method for spgist - 2

From: Darafei "Komяpa" Praliaskouski <me(at)komzpa(dot)net>
To: Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Fedor Sigaev <teodor(at)sigaev(dot)ru>
Subject: Re: compress method for spgist - 2
Date: 2017-09-20 23:06:30
Message-ID: CAC8Q8tJ6jPJd_BJftq9CVrUNTNM__P-H4jbNO9qr5oV=bYJU0w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> It is possible for bbox->low.x to be NaN when circle->center.x is and
> circle->radius are both +Infinity.
>

What is rationale behind this circle?
It seems to me that any circle with radius of any Infinity should become a
[-Infinity .. Infinity, -Infinity .. Infinity] box. Then you won't have
NaNs, and index structure shouldn't be broken.

If it happens because NaN > Infinity, then the check should be not for
isnan, but for if (low>high){swap(high, low)}. It probably should be a part
of box, not a part of circle, maths.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2017-09-20 23:08:27 Re: CREATE COLLATION does not sanitize ICU's BCP 47 language tags. Should it?
Previous Message Peter Eisentraut 2017-09-20 23:04:52 Re: CREATE COLLATION does not sanitize ICU's BCP 47 language tags. Should it?