Skip to content

Commit

Permalink
g_spoint3_fetch was already part of the spoint3 opclass in older vers…
Browse files Browse the repository at this point in the history
…ions

Allow upgrading of older installations (made pre 1.1.5) that already
have g_spoint3_fetch in the spoint3 opclass.

Close #82.
  • Loading branch information
df7cb committed Oct 18, 2023
1 parent 4ee11e1 commit afde97d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions upgrade_scripts/pg_sphere--1.3.1--1.3.2.sql.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
-- add "fetch" support function to enable index-only scans for spoint3

ALTER OPERATOR FAMILY spoint3 USING gist ADD
FUNCTION 9 (spoint, spoint) g_spoint3_fetch (internal);
-- g_spoint3_fetch was already part of the spoint3 opclass in older versions
-- around 1.0, but later made optional (see bdc37d1)

DO $$
BEGIN
ALTER OPERATOR FAMILY spoint3 USING gist ADD
FUNCTION 9 (spoint, spoint) g_spoint3_fetch (internal);
EXCEPTION
WHEN duplicate_object THEN NULL;
WHEN OTHERS THEN RAISE;
END;
$$;

0 comments on commit afde97d

Please sign in to comment.