[postgis-devel] [PostGIS] #1471: gist geometric equality operator - for geometry uniqueness constraints

PostGIS trac at osgeo.org
Sun Jan 15 12:23:31 PST 2012


#1471: gist geometric equality operator - for geometry uniqueness constraints
---------------------+------------------------------------------------------
 Reporter:  robe     |       Owner:  pramsey       
     Type:  defect   |      Status:  new           
 Priority:  medium   |   Milestone:  PostGIS Future
Component:  postgis  |     Version:  trunk         
 Keywords:           |  
---------------------+------------------------------------------------------
Description changed by robe:

Old description:

> 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/sql-createtable.html#SQL-
> CREATETABLE-EXCLUDE

New description:

 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/

--

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1471#comment:1>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-devel mailing list