Opened 12 years ago

Closed 6 years ago

Last modified 6 years ago

#1471 closed defect (fixed)

gist geometric equality operator - for geometry uniqueness constraints

Reported by: robe Owned by: pramsey
Priority: medium Milestone: PostGIS 2.4.0
Component: postgis Version: 2.4.x
Keywords: Cc:

Description (last modified by robe)

The geometric equality operator we used to have in 1.3 (~=) would be even more useful now. We can't call it ~= since that has already changed definition so much and is now just a bounding box equality (and not even that much because our bounding boxes are floats instead of the double precision of the geometry)

Something like == might be a possible choice for bringing back the good old geometric equality ~= (NOTE this requies it have a RECHECK on it.

The main benefit would be to be able to use exclusion constraints (introduced in PostgreSQL 9.0) to enforce geometry uniqueness. Right now there is no guaranteed way of doing this and EXCLUSION CONSTRAINTS won't work with functions (so ST_OrderingEquals is out of the question) — they have to be operators.

http://www.postgresql.org/docs/9.0/static/ddl-constraints.html http://thoughts.j-davis.com/2010/09/25/exclusion-constraints-are-generalized-sql-unique/

Change History (4)

comment:1 by robe, 12 years ago

Description: modified (diff)

comment:2 by robe, 7 years ago

Milestone: PostGIS FuturePostGIS Fund Me

Milestone renamed

comment:3 by pramsey, 6 years ago

Resolution: fixed
Status: newclosed
Version: trunk2.4.x

This is done w/ the fix to btree =

comment:4 by robe, 6 years ago

Milestone: PostGIS Fund MePostGIS 2.4.0
Note: See TracTickets for help on using tickets.