Patch: add GiST support for BOX @> POINT queries - Mailing list pgsql-hackers

From Andrew Tipton
Subject Patch: add GiST support for BOX @> POINT queries
Date
Msg-id AANLkTi=MwZ_UpJ7Kp572fYJ_=vr98bgvcRP8cRmzdvNP@mail.gmail.com
Whole thread Raw
Responses Re: Patch: add GiST support for BOX @> POINT queries  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Re: Patch: add GiST support for BOX @> POINT queries  (Hitoshi Harada <umi.tanuki@gmail.com>)
List pgsql-hackers
While playing around with the BOX and POINT datatypes, I was surprised to note that BOX @> POINT (and likewise POINT <@ BOX) queries were not using the GiST index I had created on the BOX column.  The attached patch adds a new strategy @>(BOX,POINT) to the box_ops opclass.  Internally, gist_box_consistent simply transforms the POINT into its corresponding BOX.

This is my first Postgres patch, and I wasn't able to figure out how to go about creating a regression test for this change.  (All existing tests do pass, but none of them seem to specifically test index behaviour.)

I know it is quite late in the CommitFest, should I add this to CF-Next?

-Andrew
Attachment

pgsql-hackers by date:

Previous
From: Marko Tiikkaja
Date:
Subject: Re: Review: Fix snapshot taking inconsistencies
Next
From: "Kevin Grittner"
Date:
Subject: Re: Patch: add GiST support for BOX @> POINT queries