Opened 2 months ago

Closed 6 days ago

#5802 closed defect (worksforme)

CREATE OPERATOR = not marked as changed

Reported by: robe Owned by: robe
Priority: medium Milestone: PostGIS 3.5.1
Component: postgis Version: 3.5.x
Keywords: Cc:

Description

I just noticed when comparing 3.4 with 3.5, that the

OPERATOR = was changed in 3.5.0, but this was not marked as such, so migrations from 3.4 to 3.5 will not pick this up.

e.g.

3.4 has signature:

CREATE OPERATOR = (
	LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_eq,
	COMMUTATOR = '=', -- we might implement a faster negator here
	RESTRICT = contsel, JOIN = contjoinsel, HASHES, MERGES
);

and 3.5 has signature and addition of ≠ operator

CREATE OPERATOR = (
	LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_eq,
	COMMUTATOR = '=', NEGATOR = '<>',
	RESTRICT = contsel, JOIN = contjoinsel, HASHES, MERGES
);

-- Availability: 3.5.0
CREATE OPERATOR <> (
	LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_neq,
	COMMUTATOR = '<>', NEGATOR = '=',
	RESTRICT = contsel, JOIN = contjoinsel, HASHES, MERGES
);

I have to confirm that our upgrade machinery is smart enough to handle this too if we mark it as changed in 3.5

Change History (1)

comment:1 by robe, 6 days ago

Resolution: worksforme
Status: assignedclosed

Okay it appears our update logic is smart enough to do the right thing, not sure how though.

But I checked:

CREATE EXTENSION postgis VERSION "3.4.4dev";

And confirmed the negator operator for = does not exist.

I checked after:

ALTER EXTENSION postgis UPDATE VERSION "3.5.1dev";

and the negator showed, even though we didn't update the message still says 0.9.0


-- Availability: 0.9.0
CREATE OPERATOR = (
	LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_eq,
	COMMUTATOR = '=', NEGATOR = '<>',
	RESTRICT = contsel, JOIN = contjoinsel, HASHES, MERGES
);

I'm not going to bother messing with this.

Note: See TracTickets for help on using tickets.