Re: SP-GiST for ranges based on 2d-mapping and quad-tree

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: SP-GiST for ranges based on 2d-mapping and quad-tree
Дата
Msg-id 1352058108.6292.13.camel@jdavis-laptop
обсуждение исходный текст
Ответ на Re: SP-GiST for ranges based on 2d-mapping and quad-tree  (Alexander Korotkov <aekorotkov@gmail.com>)
Ответы Re: SP-GiST for ranges based on 2d-mapping and quad-tree  (Andres Freund <andres@2ndquadrant.com>)
Re: SP-GiST for ranges based on 2d-mapping and quad-tree  (Alexander Korotkov <aekorotkov@gmail.com>)
Список pgsql-hackers
On Fri, 2012-11-02 at 12:47 +0400, Alexander Korotkov wrote:

> Right version of patch is attached.
> 
* In bounds_adjacent, there's no reason to flip the labels back.
* Comment should indicate more explicitly that bounds_adjacent is
sensitive to the argument order.
* In bounds_adjacent, it appears that "bound1" corresponds to "B" in the
comment above, and "bound2" corresponds to "A" in the comment above. I
would have guessed from reading the comment that bound1 corresponded to
A. We should just use consistent names between the comment and the code
(e.g. boundA and boundB).
* I could be getting confused, but I think that line 645 of
rangetypes_spgist.c should be inverted (!bounds_adjacent(...)).
* I think needPrevious should have an explanatory comment somewhere. It
looks like you are using it to store some state as you descend the tree,
but it doesn't look like it's used to reconstruct the value (because we
already have the value anyway). Since it's being used for a purpose
other than what's intended, that should be explained.

Regards,Jeff Davis





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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Unresolved error 0xC0000409 on Windows Server
Следующее
От: Jeff Davis
Дата:
Сообщение: Arguments to foreign tables?