Skip to content

Commit

Permalink
Initial SP-GiST work
Browse files Browse the repository at this point in the history
  • Loading branch information
ahinz committed Mar 30, 2013
1 parent bb64ac3 commit 60b62b1
Show file tree
Hide file tree
Showing 3 changed files with 545 additions and 0 deletions.
1 change: 1 addition & 0 deletions postgis/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ SQL_OBJS=postgis.sql legacy.sql legacy_minimal.sql
# PostgreSQL objects
PG_OBJS= \
postgis_module.o \
spgist.o \
lwgeom_accum.o \
lwgeom_spheroid.o \
lwgeom_ogc.o \
Expand Down
40 changes: 40 additions & 0 deletions postgis/pg2.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
CREATE OR REPLACE FUNCTION spgist_geom_config(internal, internal)
RETURNS void
AS '$libdir/postgis-2.1' ,'spgist_geom_config'
LANGUAGE 'c';

CREATE OR REPLACE FUNCTION spgist_geom_choose(internal, internal)
RETURNS void
AS '$libdir/postgis-2.1' ,'spgist_geom_choose'
LANGUAGE 'c';

CREATE OR REPLACE FUNCTION spgist_geom_picksplit(internal, internal)
RETURNS void
AS '$libdir/postgis-2.1' ,'spgist_geom_picksplit'
LANGUAGE 'c';

CREATE OR REPLACE FUNCTION spgist_geom_inner_consistent(internal, internal)
RETURNS void
AS '$libdir/postgis-2.1' ,'spgist_geom_inner_consistent'
LANGUAGE 'c';

CREATE OR REPLACE FUNCTION spgist_geom_leaf_consistent(internal, internal)
RETURNS boolean
AS '$libdir/postgis-2.1' ,'spgist_geom_leaf_consistent'
LANGUAGE 'c';

CREATE OPERATOR CLASS spgist_geometry_ops_2d
FOR TYPE geometry
USING SPGiST
AS OPERATOR 1 <<,
OPERATOR 5 >>,
OPERATOR 6 ~=,
OPERATOR 8 @,
OPERATOR 10 <<|,
OPERATOR 11 |>>,
FUNCTION 1 spgist_geom_config(internal, internal),
FUNCTION 2 spgist_geom_choose(internal, internal),
FUNCTION 3 spgist_geom_picksplit(internal, internal),
FUNCTION 4 spgist_geom_inner_consistent(internal, internal),
FUNCTION 5 spgist_geom_leaf_consistent(internal, internal)

Loading

0 comments on commit 60b62b1

Please sign in to comment.