pgsql: Introduce SP-GiST operator class over box.
Introduce SP-GiST operator class over box.
Patch implements quad-tree over boxes, naive approach of 2D quad tree will not
work for any non-point objects because splitting space on node is not
efficient. The idea of pathc is treating 2D boxes as 4D points, so,
object will not overlap (in 4D space).
The performance tests reveal that this technique especially beneficial
with too much overlapping objects, so called "spaghetti data".
Author: Alexander Lebedev with editorization by Emre Hasegeli and me
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/acdf2a8b372aec1da09370fca77ff7dccac7646d
Modified Files
--------------
doc/src/sgml/spgist.sgml | 18 +
src/backend/utils/adt/Makefile | 4 +-
src/backend/utils/adt/geo_spgist.c | 699 +++++++++++++++++++++++++++++++
src/include/catalog/pg_amop.h | 16 +
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/geo_decls.h | 6 +
src/test/regress/expected/box.out | 240 +++++++++++
src/test/regress/expected/opr_sanity.out | 6 +-
src/test/regress/sql/box.sql | 62 +++
12 files changed, 1066 insertions(+), 3 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Teodor Sigaev <teodor@sigaev.ru> writes:
Introduce SP-GiST operator class over box.
All of the Windows buildfarm members are failing on this patch.
It looks like the problem is that the test cases suppose that type
box will allow "infinity" as a coordinate value. But box_in just
uses strtod() to read coordinates, and that has platform-dependent
behavior, which in this case includes not recognizing "infinity".
I'm inclined to think that the best fix is to rearrange things
so that the box I/O routines use float8in and float8out for
coordinates, rather than assuming that direct use of the platform
primitives is sufficient.
Barring better ideas, I'll go make that happen.
Welcome to the club of people who have broken the Windows build
this week ;-)
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers