postgrespro/pgsphere

Operator `@` is incompatible with PG17

Closed this issue · 3 comments

df7cb commented

PG17 doesn't like the bigint @ smoc and smoc @ bigint operators:

+psql:pg_sphere.test.sql:9968: ERROR:  commutator operator @> is already the commutator of operator <@
+psql:pg_sphere.test.sql:9978: ERROR:  commutator operator @> is already the commutator of operator <@

This is from pgs_moc_compat.sql.in:

-- 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
);

The IMHO best fix would be to drop the @ operator. Alternatively, we can drop the COMMUTATOR and NEGATOR clauses.

Comments?

Cc: @msdemlei

df7cb commented

The feedback from the PG discussion was mostly "what the heck are these operators doing there", so it seems best to indeed remove them from pgsphere. I just opened a PR to do just that.