Re: contrib/rtree_gist into core system?

Поиск
Список
Период
Сортировка
От John Hansen
Тема Re: contrib/rtree_gist into core system?
Дата
Msg-id 5066E5A966339E42AA04BA10BA706AE50A9379@rodrick.geeknet.com.au
обсуждение исходный текст
Ответ на contrib/rtree_gist into core system?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: contrib/rtree_gist into core system?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: contrib/rtree_gist into core system?  (Teodor Sigaev <teodor@sigaev.ru>)
Список pgsql-hackers
Tom Lane Wrote:

> ... but rtree has always
> been marginal, and it's very hard to see where it can win over gist.

Simplicity!

Implementing rtree operators and support functions is FAR simpler than
implementing the GiST equivalents.

For example, suppose all you want to implement is the ~ operator for a
custom type, then technically all you need is 4 functions (well, 5
including the stub operators)

bool contains(type,type);
type intersect(type,type);
type union(type,type);
void size(type,*float);

And the 6 other operators simply defined as:
bool false(type) { return false; }

For GiST you still need 7 support functions + the operator function,
some of which aren't exactly simple to implement, the picksplit for
instance.

So I'd not recommend getting rid of rtree just yet. At least not until
someone has written an extensive howto on the subject of GiST
implementation.

... John


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: contrib/rtree_gist into core system?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: contrib/rtree_gist into core system?