From e810f5ddd827881b06a92a303c5c9fbf997b892e Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Thu, 26 Oct 2023 12:01:10 +0200 Subject: [PATCH] Drop obsolete compatibility @({bigint,spoint}, smoc) operators These were required by GAVO DaCHS, but are not used anymore. Furthermore, PG17 will forbid declaring commutators and negators relations with operators that themselves have relations to different operators. We delete pgs_moc_compat.sql.in and remove it from the old pg_sphere--1.1.5beta2gavo--1.1.5beta4gavo.sql upgrade script. This is ok to do since dropping the operators uses "if exists". Discussion: https://www.postgresql.org/message-id/flat/ZTfL1G1fBPQHVPWV%40msg.df7cb.de#ce3801c084bcf05b6b976cb2d0e25b2d Close #85. --- Makefile | 4 ++-- pgs_moc_compat.sql.in | 22 ------------------- .../pg_sphere--1.3.1--1.3.2.sql.in | 4 ++++ 3 files changed, 6 insertions(+), 24 deletions(-) delete mode 100644 pgs_moc_compat.sql.in diff --git a/Makefile b/Makefile index 5782814..2a685d3 100644 --- a/Makefile +++ b/Makefile @@ -65,7 +65,7 @@ endif PGS_SQL += pgs_gist_spoint3.sql ifneq ($(USE_HEALPIX),0) -PGS_SQL += pgs_moc_type.sql pgs_moc_compat.sql pgs_moc_ops.sql \ +PGS_SQL += pgs_moc_type.sql pgs_moc_ops.sql \ pgs_moc_geo_casts.sql endif @@ -154,7 +154,7 @@ ifneq ($(USE_HEALPIX),0) pg_sphere--1.1.5beta0gavo--1.1.5beta2gavo.sql: pgs_moc_type.sql.in cat upgrade_scripts/$@.in $^ > $@ -pg_sphere--1.1.5beta2gavo--1.1.5beta4gavo.sql: pgs_moc_compat.sql.in +pg_sphere--1.1.5beta2gavo--1.1.5beta4gavo.sql: cat upgrade_scripts/$@.in $^ > $@ pg_sphere--1.1.5beta4gavo--1.2.0.sql: pgs_moc_ops.sql.in diff --git a/pgs_moc_compat.sql.in b/pgs_moc_compat.sql.in deleted file mode 100644 index 212b4f3..0000000 --- a/pgs_moc_compat.sql.in +++ /dev/null @@ -1,22 +0,0 @@ --- a minimal set of backwards-compatible operators for GAVO DaCHS, --- see http://soft.g-vo.org/dachs - -CREATE OPERATOR @ ( - LEFTARG = bigint, - RIGHTARG = smoc, - PROCEDURE = healpix_subset_smoc, - COMMUTATOR = '@>', - NEGATOR = '!<@', - RESTRICT = contsel, - JOIN = contjoinsel -); - -CREATE OPERATOR @ ( - LEFTARG = spoint, - RIGHTARG = smoc, - PROCEDURE = spoint_subset_smoc, - COMMUTATOR = '@>', - NEGATOR = '!<@', - RESTRICT = contsel, - JOIN = contjoinsel -); diff --git a/upgrade_scripts/pg_sphere--1.3.1--1.3.2.sql.in b/upgrade_scripts/pg_sphere--1.3.1--1.3.2.sql.in index 1ada066..bdad0c2 100644 --- a/upgrade_scripts/pg_sphere--1.3.1--1.3.2.sql.in +++ b/upgrade_scripts/pg_sphere--1.3.1--1.3.2.sql.in @@ -12,3 +12,7 @@ EXCEPTION WHEN OTHERS THEN RAISE; END; $$; + +-- remove legacy spellings of operators +DROP OPERATOR IF EXISTS @(bigint, smoc); +DROP OPERATOR IF EXISTS @(spoint, smoc);