diff schema/auth.sql @ 1983:f9f1babe52ae

Fix area generation from multipolygon input In case the waterway axis representing a stretch intersects distinct parts of the input area, a multipolygon has to be returned. Before, an arbitrary polygon was selected due to the used function not being set-returning. In passing, consistently name respective columns in schema.
author Tom Gottfried <tom@intevation.de>
date Wed, 23 Jan 2019 16:25:43 +0100
parents 2e0e7c1589c2
children 59055c8301df
line wrap: on
line diff
--- a/schema/auth.sql	Wed Jan 23 16:18:36 2019 +0100
+++ b/schema/auth.sql	Wed Jan 23 16:25:43 2019 +0100
@@ -127,7 +127,7 @@
 
 CREATE POLICY responsibility_area ON waterway.stretches
     FOR ALL TO sys_admin
-    USING (utm_covers(geom));
+    USING (utm_covers(area));
 
 --
 -- RLS policies for imports and import config