Re: GiST index build versus NaN coordinates

Поиск
Список
Период
Сортировка
От Emre Hasegeli
Тема Re: GiST index build versus NaN coordinates
Дата
Msg-id CAE2gYzyCerqkP1rWEfOK2iNhr+TATFFb7-Yifut2_4Pzhdwq_g@mail.gmail.com
обсуждение исходный текст
Ответ на GiST index build versus NaN coordinates  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: GiST index build versus NaN coordinates  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> I think that probably the most reasonable answer is to replace all the
> raw "double" comparisons in this code with float8_cmp_internal() or
> something that's the moral equivalent of that.  Does anyone want to
> propose something else?

We can probably get away by changing the comparison on the GiST code.
It is not likely to cause inconsistent results.  Comparisons with NaN
coordinates don't return true to anything, anyway:

# select '(3,4),(nan,5)'::box = '(3,4),(nan,5)'::box;?column?
----------f
(1 row)

# select '(3,4),(nan,5)'::box < '(3,4),(nan,5)'::box;?column?
----------f
(1 row)

# select '(3,4),(nan,5)'::box > '(3,4),(nan,5)'::box;?column?
----------f
(1 row)

> More generally, this example makes me fearful that NaN coordinates in
> geometric values are likely to cause all sorts of issues.  It's too late
> to disallow them, probably, but I wonder how can we identify other bugs
> of this ilk.

Is it reasonable to disallow NaN coordinates on the next major
release.  Are there any reason to deal with them?



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: IMPORT FOREIGN SCHEMA can't be run in in pl/pgsql due to INTO
Следующее
От: Tom Lane
Дата:
Сообщение: Re: GiST index build versus NaN coordinates