]> granicus.if.org Git - postgresql/commit
Add SP-GiST support for range types.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 16 Aug 2012 09:55:37 +0000 (12:55 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 16 Aug 2012 11:30:45 +0000 (14:30 +0300)
commit317dd55a9cae160c8d121eaec323a6aea3259fd8
treeea6c4d1f0042073855752dc0ce360f080dcfe163
parent89911b3ab848915dd64d21ca3d3537470c93f89c
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.
15 files changed:
src/backend/utils/adt/Makefile
src/backend/utils/adt/rangetypes_gist.c
src/backend/utils/adt/rangetypes_spgist.c [new file with mode: 0644]
src/include/catalog/catversion.h
src/include/catalog/pg_amop.h
src/include/catalog/pg_amproc.h
src/include/catalog/pg_opclass.h
src/include/catalog/pg_opfamily.h
src/include/catalog/pg_proc.h
src/include/utils/rangetypes.h
src/test/regress/expected/opr_sanity.out
src/test/regress/expected/rangetypes.out
src/test/regress/expected/sanity_check.out
src/test/regress/output/misc.source
src/test/regress/sql/rangetypes.sql