Skip to content
Permalink
Browse files

defered delete should be done even if the place is otherwise blocked

  • Loading branch information...
twain47 committed Sep 3, 2012
1 parent afe3088 commit 1c75adb39fe6f21e4fda3885ded15141edd1f6f8
Showing with 7 additions and 7 deletions.
  1. +7 −7 sql/functions.sql
@@ -1234,6 +1234,13 @@ DECLARE
result BOOLEAN;
BEGIN

-- deferred delete
IF OLD.indexed_status = 100 THEN
--DEBUG: RAISE WARNING 'placex_update_delete % %',NEW.osm_type,NEW.osm_id;
delete from placex where place_id = OLD.place_id;
RETURN NULL;
END IF;

IF NEW.indexed_status != 0 OR OLD.indexed_status = 0 OR NEW.linked_place_id is not null THEN
RETURN NEW;
END IF;
@@ -1248,13 +1255,6 @@ BEGIN
RETURN NEW;
END IF;

-- deferred delete
IF OLD.indexed_status = 100 THEN
--DEBUG: RAISE WARNING 'placex_update_delete % %',NEW.osm_type,NEW.osm_id;
delete from placex where place_id = OLD.place_id;
RETURN NULL;
END IF;

IF OLD.indexed_status != 0 THEN
--DEBUG: RAISE WARNING 'placex_update_0 % %',NEW.osm_type,NEW.osm_id;

0 comments on commit 1c75adb

Please sign in to comment.
You can’t perform that action at this time.