Skip to content

Commit 127a96c

Browse files
committed
Raise the version up to 1.5.0, add upgrade script
1 parent ba24afb commit 127a96c

File tree

5 files changed

+24
-4
lines changed

5 files changed

+24
-4
lines changed

Diff for: Makefile

+5-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ DATA_built = $(RELEASE_SQL) \
3434
pg_sphere--1.3.0--1.3.1.sql \
3535
pg_sphere--1.3.1--1.4.0.sql \
3636
pg_sphere--1.4.0--1.4.1.sql \
37-
pg_sphere--1.4.1--1.4.2.sql
37+
pg_sphere--1.4.1--1.4.2.sql \
38+
pg_sphere--1.4.2--1.5.0.sql
3839

3940
DOCS = README.pg_sphere COPYRIGHT.pg_sphere
4041
TESTS = version tables points euler circle line ellipse poly path box \
@@ -209,6 +210,9 @@ pg_sphere--1.3.1--1.4.0.sql: pgs_circle_sel.sql.in pgs_hash.sql.in
209210
pg_sphere--1.4.0--1.4.1.sql pg_sphere--1.4.1--1.4.2.sql:
210211
@echo "-- Nothing to upgrade in the schema" > $@
211212

213+
pg_sphere--1.4.2--1.5.0.sql:
214+
cat upgrade_scripts/$@.in $^ > $@
215+
212216
# end of local stuff
213217

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

Diff for: 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.4.2
8+
PGSPHERE_VERSION := 1.5.0

Diff for: 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.4.2
5+
1.5.0
66
(1 row)
77

Diff for: 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.4.2'
3+
default_version = '1.5.0'
44
module_pathname = '$libdir/pg_sphere'
55
relocatable = true

Diff for: upgrade_scripts/pg_sphere--1.4.2--1.5.0.sql.in

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
-- Upgrade: 1.4.2 -> 1.5.0
2+
3+
CREATE FUNCTION g_spoint_distance(internal, spoint, smallint, oid, internal)
4+
RETURNS internal
5+
AS 'MODULE_PATHNAME', 'g_spoint_distance'
6+
LANGUAGE 'c';
7+
8+
DO $$
9+
BEGIN
10+
ALTER OPERATOR FAMILY spoint USING gist ADD
11+
FUNCTION 8 (spoint, spoint) g_spoint_distance (internal, spoint, smallint, oid, internal);
12+
EXCEPTION
13+
WHEN duplicate_object THEN NULL;
14+
WHEN OTHERS THEN RAISE;
15+
END;
16+
$$;

0 commit comments

Comments
 (0)