view schema/updates/1436/02.axis_no_intersecting_validity.sql @ 5559:ce9a9a1bf92f

Make invalid output of ISRSrange_area() less likely, next try Since ST_MakeValid() might return a collection of lower-to-equal dimension geometries, distill only the polygons from it. This should prevent respective errors when trying to save the result to a column of type MultiPolygon.
author Tom Gottfried <tom@intevation.de>
date Thu, 02 Dec 2021 12:37:33 +0100
parents 722b7c305319
children
line wrap: on
line source

DROP TRIGGER waterway_axis_wtwaxs_unique ON waterway.waterway_axis;

CREATE CONSTRAINT TRIGGER waterway_axis_wtwaxs_unique
    AFTER INSERT OR UPDATE OF wtwaxs, validity ON waterway.waterway_axis
    DEFERRABLE INITIALLY DEFERRED
    FOR EACH ROW
    EXECUTE FUNCTION prevent_st_equals('wtwaxs', 'validity WITH &&');