From: | Alexander Korotkov <aekorotkov(at)gmail(dot)com> |
---|---|
To: | Jeff Davis <pgsql(at)j-davis(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> |
Subject: | Re: SP-GiST for ranges based on 2d-mapping and quad-tree |
Date: | 2012-12-13 21:31:02 |
Message-ID: | CAPpHfdtbJst_rRuGnU02DmY+g5ibpZFN=+-gEM778zZ=uzVaew@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | Postg메이저 토토 사이트SQL |
Hi!
On Sun, Nov 4, 2012 at 11:41 PM, Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
> 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.
>
Fixed.
> * Comment should indicate more explicitly that bounds_adjacent is
> sensitive to the argument order.
>
Fixed.
> * 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).
>
Fixed.
> * I could be getting confused, but I think that line 645 of
> rangetypes_spgist.c should be inverted (!bounds_adjacent(...)).
>
Good catch! Actually, code was in direct contradiction with comment. Fixed.
> * 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.
>
Yes, it's a some kind of hack now. Comment is added.
------
With best regards,
Alexander Korotkov.
Attachment | Content-Type | Size |
---|---|---|
range_spgist_adjacent-0.4.patch.gz | application/x-gzip | 3.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Korotkov | 2012-12-13 21:34:01 | Re: WIP: index support for regexp search |
Previous Message | Alexander Korotkov | 2012-12-13 21:03:39 | Re: gistchoose vs. bloat |