Skip to content

Commit 382a3c5

Browse files
committed
Alter spoint op family to add missed operator 17 (<->)
The upgrade script misses the altering of spoint operator family to add operator 17. It is required for k-NN search.
1 parent 8394ae7 commit 382a3c5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

upgrade_scripts/pg_sphere--1.4.2--1.5.0.sql.in

+10
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@ EXCEPTION
1515
END;
1616
$$;
1717

18+
DO $$
19+
BEGIN
20+
ALTER OPERATOR FAMILY spoint USING gist ADD
21+
OPERATOR 17 <-> (spoint, spoint) FOR ORDER BY float_ops;
22+
EXCEPTION
23+
WHEN duplicate_object THEN NULL;
24+
WHEN OTHERS THEN RAISE;
25+
END;
26+
$$;
27+
1828
CREATE FUNCTION reset_sphere_output_precision()
1929
RETURNS CSTRING
2030
AS 'MODULE_PATHNAME', 'reset_sphere_output_precision'

0 commit comments

Comments
 (0)