Add SP-GiST support for range types.
Heikki Linnakangas <heikki.linnakangas@iki.fi>
Add SP-GiST support for range types. The implementation is a quad-tree, largely copied from the quad-tree implementation for points. The lower and upper bound of ranges are the 2d coordinates, with some extra code to handle empty ranges. I left out the support for adjacent operator, -|-, from the original patch. Not because there was necessarily anything wrong with it, but it was more complicated than the other operators, and I only have limited time for reviewing. That will follow as a separate patch. Alexander Korotkov, reviewed by Jeff Davis and me.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/adt/Makefile | modified | +1 −1 |
| src/backend/utils/adt/rangetypes_gist.c | modified | +0 −13 |
| src/backend/utils/adt/rangetypes_spgist.c | added | +748 −0 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/catalog/pg_amop.h | modified | +13 −0 |
| src/include/catalog/pg_amproc.h | modified | +5 −0 |
| src/include/catalog/pg_opclass.h | modified | +1 −0 |
| src/include/catalog/pg_opfamily.h | modified | +1 −0 |
| src/include/catalog/pg_proc.h | modified | +11 −0 |
| src/include/utils/rangetypes.h | modified | +13 −0 |
| src/test/regress/expected/opr_sanity.out | modified | +7 −1 |
| src/test/regress/expected/rangetypes.out | modified | +219 −0 |
| src/test/regress/expected/sanity_check.out | modified | +2 −1 |
| src/test/regress/output/misc.source | modified | +2 −1 |
| src/test/regress/sql/rangetypes.sql | modified | +62 −0 |