Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion COPYRIGHT.pg_sphere
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2003-2017, pgSphere development team
Copyright (c) 2003-2018, pgSphere development team
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
31 changes: 23 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,39 @@

PGSPHERE_VERSION = 1.1.5
PGSPHERE_VERSION = 1.1.6

# the base dir name may be changed depending on git clone command
SRC_DIR = $(shell basename $(shell pwd))

MODULE_big = pg_sphere

ifndef PG_CONFIG
PG_CONFIG := pg_config
endif

PG_FULL_VERSION := $(shell $(PG_CONFIG) --version)
PG_MAJOR_VERSION := $(shell echo $(PG_FULL_VERSION) | cut -d' ' -f2 | cut -d. -f1)
PG_MINOR_VERSION := $(shell echo $(PG_FULL_VERSION) | cut -d' ' -f2 | cut -d. -f2)
BRIN_CHECK := $(shell [ $(PG_MAJOR_VERSION)$(PG_MINOR_VERSION) -gt 94 ] && echo 1 || echo 0 )
ifeq ($(BRIN_CHECK), 1)
BRIN_OBJ := brin.o
BRIN_SQL := pgs_brin.sql
BRIN_REGRESS := spoint_brin
endif

OBJS = sscan.o sparse.o sbuffer.o vector3d.o point.o \
euler.o circle.o line.o ellipse.o polygon.o \
path.o box.o output.o gq_cache.o gist.o key.o \
$(BRIN_OBJ) \
gnomo.o

EXTENSION = pg_sphere
DATA_built = pg_sphere--1.0.sql
DATA_built = pg_sphere--1.1.sql
DOCS = README.pg_sphere COPYRIGHT.pg_sphere
REGRESS = init tables points euler circle line ellipse poly path box index \
contains_ops contains_ops_compat bounding_box_gist gnomo
contains_ops contains_ops_compat bounding_box_gist gnomo \
$(BRIN_REGRESS)

EXTRA_CLEAN = pg_sphere--1.0.sql $(PGS_SQL)
EXTRA_CLEAN = pg_sphere--1.1.sql $(PGS_SQL)

CRUSH_TESTS = init_extended circle_extended

Expand All @@ -25,11 +42,9 @@ PGS_SQL = pgs_types.sql pgs_point.sql pgs_euler.sql pgs_circle.sql \
pgs_line.sql pgs_ellipse.sql pgs_polygon.sql pgs_path.sql \
pgs_box.sql pgs_contains_ops.sql pgs_contains_ops_compat.sql \
pgs_gist.sql gnomo.sql \
$(BRIN_SQL)

ifdef USE_PGXS
ifndef PG_CONFIG
PG_CONFIG := pg_config
endif
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
else
Expand All @@ -43,7 +58,7 @@ endif
crushtest: REGRESS += $(CRUSH_TESTS)
crushtest: installcheck

pg_sphere--1.0.sql: $(addsuffix .in, $(PGS_SQL))
pg_sphere--1.1.sql: $(addsuffix .in, $(PGS_SQL))
cat $^ > $@

sscan.o : sparse.c
Expand Down
14 changes: 12 additions & 2 deletions README.pg_sphere
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
This is an R-Tree implementation using GiST for spherical objects
like spherical points and spherical circles with
useful functions and operators.

useful functions and operators. It also support the Block Range
INdexing (BRIN), recently included in PostgreSQL for large
datasets.

NOTICE:
This version will work only with postgresql version 9.1 and above.
BRIN support work only with postgresql version 9.4 and above.

INSTALLATION:

Expand All @@ -24,6 +26,14 @@ LONG REGRESSION TEST:

The 'make' program must be compatible with GNU make.

UPGRADES:

In case of upgrades from pre-9.5 versions, please run the following command in
case you are interested to activate BRIN support (adjust psql connection
parameters to your needs):

bash utils/upgrade_from_pre95.sh | psql -U postgres -h localhost -p 5432 <dbname> 2> errors.log

For more information, have a look at http://pgsphere.projects.postgresql.org
and https://github.com/akorotkov/pgsphere

Expand Down
Loading