trigger postgis and dump qgis 2.8.2

المشرف العام

Administrator
طاقم الإدارة
I created a trigger that checks if geometry is valid on insert and update.

create or replace function check_geom() returns trigger as$$begin--insert a polygonIF st_isvalid(new.geom) = 'f'THEN RAISE EXCEPTION 'erreur de topologie' ;END IF ;RETURN NULL ;end;$$ LANGUAGE plpgsql;DROP TRIGGER IF EXISTS trg_check_geom ON public.uniteobservation ;CREATE TRIGGER trg_check_geom BEFORE INSERT OR UPDATE on public.uniteobservationFOR EACH ROW EXECUTE PROCEDURE check_geom();I have an error message when I create a feature with a wrong geometry (self intersection,...). I can correct and validate it.But I can't update a second times : QGIS mini dump each time I select a vertex again.Any idea ?



أكثر...
 
أعلى