Re: Box type equality

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Box type equality
Дата
Msg-id 15434.1443541387@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Box type equality  (Stanislav Kelvich <s.kelvich@postgrespro.ru>)
Ответы Re: Box type equality  (Jeff Anton <antonpgsql@hesiod.org>)
Список pgsql-hackers
Stanislav Kelvich <s.kelvich@postgrespro.ru> writes:
> I've faced an issue with Box type comparison that exists almost for a five years.

Try twenty-five years.  The code's been like that since Berkeley.

>   That can be fixed by b-tree equality for boxes, but we need some
>   decisions there.

The problem with inventing a btree opclass for boxes is much more
fundamental than fuzzy comparisons, unfortunately.  Btree requires a
linear sort order, and there's no plausible linear ordering of boxes,
unless you compare areas which won't give the equality semantics you want.

We could perhaps invent an exact-equality operator and construct just
a hash opclass for it, no btree.

In any case I think it would be a mistake to consider only boxes; all
the built-in geometric types have related issues.
        regards, tom lane



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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: No Issue Tracker - Say it Ain't So!
Следующее
От: Jeff Anton
Дата:
Сообщение: Re: Box type equality