Skip to content

Commit

Permalink
defered delete should be done even if the place is otherwise blocked
Browse files Browse the repository at this point in the history
  • Loading branch information
twain47 committed Sep 3, 2012
1 parent afe3088 commit 1c75adb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions sql/functions.sql
Expand Up @@ -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;
Expand All @@ -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;

Expand Down

0 comments on commit 1c75adb

Please sign in to comment.