Change SELECT to PERFORM in function and drop triggers first

This commit is contained in:
stirringhalo
2017-01-06 20:33:43 -05:00
parent b58d80ce44
commit cda3af9215
10 changed files with 30 additions and 37 deletions

View File

@@ -1,3 +1,5 @@
DROP TRIGGER IF EXISTS trigger_flag ON osm_waterway_linestring;
DROP TRIGGER IF EXISTS trigger_refresh ON waterway.updates;
-- We merge the waterways by name like the highways
-- This helps to drop not important rivers (since they do not have a name)
@@ -74,9 +76,6 @@ CREATE OR REPLACE FUNCTION waterway.refresh() RETURNS trigger AS
$BODY$
language plpgsql;
DROP TRIGGER IF EXISTS trigger_flag ON osm_waterway_linestring;
DROP TRIGGER IF EXISTS trigger_refresh ON waterway.updates;
CREATE TRIGGER trigger_flag
AFTER INSERT OR UPDATE OR DELETE ON osm_waterway_linestring
FOR EACH STATEMENT