Add polygon opclass for SP-GiST

Enterprise / PostgreSQL - Teodor Sigaev [sigaev.ru] - 25 December 2017 15:59 EST

Polygon opclass uses compress method feature of SP-GiST added earlier. For now it's a single operator class which uses this feature. SP-GiST actually indexes a bounding boxes of input polygons, so part of supported operations are lossy. Opclass uses most methods of corresponding opclass over boxes of SP-GiST and treats bounding boxes as point in 4D-space.

Bump catalog version.

Authors: Nikita Glukhov, Alexander Korotkov with minor editorization by me

ff963b393c Add polygon opclass for SP-GiST
doc/src/sgml/spgist.sgml | 36 +++++
src/backend/utils/adt/geo_ops.c | 3 +-
src/backend/utils/adt/geo_spgist.c | 92 ++++++++++-
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_amop.h | 16 ++
src/include/catalog/pg_amproc.h | 6 +
src/include/catalog/pg_opclass.h | 1 +
src/include/catalog/pg_opfamily.h | 1 +
src/include/catalog/pg_proc.h | 5 +
src/include/utils/geo_decls.h | 3 +-
src/test/regress/expected/polygon.out | 238 +++++++++++++++++++++++++++++
src/test/regress/expected/sanity_check.out | 3 +
src/test/regress/sql/polygon.sql | 93 +++++++++++
13 files changed, 491 insertions(+), 8 deletions(-)

Upstream: git.postgresql.org


  • Share