# HG changeset patch # User Tom Gottfried # Date 1579883592 -3600 # Node ID 8a4c98b80fbd3468a9f0652af96e069b40cf4e2f # Parent 5c12b7cdc58c1dc19f502b98574f3626f5020e5b Make constraint trigger work in sessions with empty search_path Constraint triggers involving check_sr_in_bn_area() failed when applied in a session with empty search_path, because the used PostGIS function in the public schema was not found. This could prevent restoring values in waterway.sounding_results from a dump created using pg_dump. diff -r 5c12b7cdc58c -r 8a4c98b80fbd schema/gemma.sql --- a/schema/gemma.sql Fri Jan 24 16:48:59 2020 +0100 +++ b/schema/gemma.sql Fri Jan 24 17:33:12 2020 +0100 @@ -231,7 +231,7 @@ LANGUAGE plpgsql AS $$ BEGIN - IF NOT st_intersects((SELECT area + IF NOT public.ST_Intersects((SELECT area FROM waterway.bottlenecks WHERE bottleneck_id = NEW.bottleneck_id AND validity @> NEW.date_info::timestamptz),