Skip to content

Commit daa9478

Browse files
authored
Alter spoint op family to add missed operator 17 (<->) (#121)
The upgrade script misses the altering of spoint operator family to add operator 17. It is required for k-NN search. Change the version to 1.5.1.
1 parent 8394ae7 commit daa9478

File tree

5 files changed

+19
-4
lines changed

5 files changed

+19
-4
lines changed

Makefile

+5-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ DATA_built = $(RELEASE_SQL) \
3535
pg_sphere--1.3.1--1.4.0.sql \
3636
pg_sphere--1.4.0--1.4.1.sql \
3737
pg_sphere--1.4.1--1.4.2.sql \
38-
pg_sphere--1.4.2--1.5.0.sql
38+
pg_sphere--1.4.2--1.5.0.sql \
39+
pg_sphere--1.5.0--1.5.1.sql
3940

4041
DOCS = README.pg_sphere COPYRIGHT.pg_sphere
4142
TESTS = version tables points euler circle line ellipse poly path box \
@@ -214,6 +215,9 @@ pg_sphere--1.4.0--1.4.1.sql pg_sphere--1.4.1--1.4.2.sql:
214215
pg_sphere--1.4.2--1.5.0.sql:
215216
cat upgrade_scripts/$@.in $^ > $@
216217

218+
pg_sphere--1.5.0--1.5.1.sql:
219+
cat upgrade_scripts/$@.in $^ > $@
220+
217221
# end of local stuff
218222

219223
src/sscan.o : src/sparse.c

Makefile.common.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
#----------------------------------------------------------------------------
66

77
EXTENSION := pg_sphere
8-
PGSPHERE_VERSION := 1.5.0
8+
PGSPHERE_VERSION := 1.5.1

expected/version.out

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
SELECT pg_sphere_version();
33
pg_sphere_version
44
-------------------
5-
1.5.0
5+
1.5.1
66
(1 row)
77

pg_sphere.control

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# pg_sphere extension
22
comment = 'spherical objects with useful functions, operators and index support'
3-
default_version = '1.5.0'
3+
default_version = '1.5.1'
44
module_pathname = '$libdir/pg_sphere'
55
relocatable = true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
-- Upgrade: 1.5.0 -> 1.5.1
2+
3+
DO $$
4+
BEGIN
5+
ALTER OPERATOR FAMILY spoint USING gist ADD
6+
OPERATOR 17 <-> (spoint, spoint) FOR ORDER BY float_ops;
7+
EXCEPTION
8+
WHEN duplicate_object THEN NULL;
9+
WHEN OTHERS THEN RAISE;
10+
END;
11+
$$;

0 commit comments

Comments
 (0)