changeset 4873:8a4c98b80fbd

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.
author Tom Gottfried <tom@intevation.de>
date Fri, 24 Jan 2020 17:33:12 +0100
parents 5c12b7cdc58c
children 7cbe5d32a614 3fc3f1ed8531 dd888bbb7e43
files schema/gemma.sql
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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),