view schema/updates/1423/01.axis_as_multilinestring.sql @ 5247:d89f5d75223e new-fwa

Deactivate interpolation stop for gaps longer than 1.5 hours.
author Sascha L. Teichmann <teichmann@intevation.de>
date Tue, 12 May 2020 22:24:16 +0200
parents e8b2dc771f9e
children
line wrap: on
line source

-- Cannot alter type of a column used in a trigger definition
DROP TRIGGER waterway_axis_wtwaxs_unique ON waterway.waterway_axis;

ALTER TABLE waterway.waterway_axis
    ALTER wtwaxs TYPE geography(MULTILINESTRING, 4326)
        USING ST_Multi(CAST(wtwaxs AS geometry));

-- Re-create trigger
CREATE CONSTRAINT TRIGGER waterway_axis_wtwaxs_unique
    AFTER INSERT OR UPDATE OF wtwaxs ON waterway.waterway_axis
    FOR EACH ROW EXECUTE FUNCTION prevent_st_equals('wtwaxs');