Thread: pgsql: Add polygon opclass for SP-GiST
Add polygon opclass for SP-GiST 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 Reviewed-By: all authors + Darafei Praliaskouski Discussion: https://www.postgresql.org/message-id/flat/54907069.1030506@sigaev.ru Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/ff963b393ca93a71d2f398c4c584b322cd351c2c Modified Files -------------- 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(-)