pgsql: Add SP-GiST support for range types.

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add SP-GiST support for range types.
Date: 2012-08-16 11:47:19
Message-ID: E1T1yXn-0002we-KU@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/317dd55a9cae160c8d121eaec323a6aea3259fd8

Modified Files
--------------
src/backend/utils/adt/Makefile | 2 +-
src/backend/utils/adt/rangetypes_gist.c | 13 -
src/backend/utils/adt/rangetypes_spgist.c | 748 ++++++++++++++++++++++++++++
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_amop.h | 13 +
src/include/catalog/pg_amproc.h | 5 +
src/include/catalog/pg_opclass.h | 1 +
src/include/catalog/pg_opfamily.h | 1 +
src/include/catalog/pg_proc.h | 11 +
src/include/utils/rangetypes.h | 13 +
src/test/regress/expected/opr_sanity.out | 8 +-
src/test/regress/expected/rangetypes.out | 219 ++++++++
src/test/regress/expected/sanity_check.out | 3 +-
src/test/regress/output/misc.source | 3 +-
src/test/regress/sql/rangetypes.sql | 62 +++
15 files changed, 1086 insertions(+), 18 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Hiroshi Saito 2012-08-16 12:35:06 psqlodbc - psqlodbc: Prep release 09.01.0200
Previous Message Dave Page 2012-08-16 10:43:35 pginstaller - pginst: Update for 8.3.20