[postgis-tickets] [PostGIS] #3507: topology.relation trigger guard insert/update but no delete

PostGIS trac at osgeo.org
Tue Aug 7 03:08:20 PDT 2018


#3507: topology.relation trigger guard insert/update but no delete
-----------------------+---------------------------
  Reporter:  strk      |      Owner:  strk
      Type:  defect    |     Status:  closed
  Priority:  medium    |  Milestone:  PostGIS 2.5.0
 Component:  topology  |    Version:  2.0.x
Resolution:  wontfix   |   Keywords:
-----------------------+---------------------------
Changes (by robe):

 * status:  new => closed
 * resolution:   => wontfix


Comment:

 I checked the relationtrigger function that is called for the
 relation_integrity_checks.
 It returns error if you try to call against a DELETE event.

 I don't see an easy way of checking in before delete anyway.

 In the case of delete from relation, you have two problems

 1) You have to find all references of the topogeometry in the database to
 make sure it is not in use anymore (otherwise your topogeometry is
 broken).  This can be huge check for each run of before delete. The
 performance hit is not worth the problem in my opinion, though I guess we
 can do some tests.

 2) You can't allow a partial delete of a topogeometry (presumably) - I
 suppose merges and so forth might change things
 and since you only get one record at a time in the before delete trigger,
 not sure how you would be able to check after all deletes that you are not
 left with a partial topogeometry.

 That said I think this problem is unsolvable with triggers.  You need to
 change the management functions to accomodate.

 I'm dismissing this as a wontfix.

 strk if you have other thoughts, feel free to reopen.

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3507#comment:4>
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-tickets mailing list