[Mapbender-commits] r8176 - trunk/mapbender/resources/db/pgsql/UTF-8/update

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Oct 3 14:55:56 EDT 2011


Author: armin11
Date: 2011-10-03 11:55:55 -0700 (Mon, 03 Oct 2011)
New Revision: 8176

Modified:
   trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.2_to_2.7.3_pgsql_UTF-8.sql
Log:
Stored procedure to count the number of coupled ressources of each layer.

Modified: trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.2_to_2.7.3_pgsql_UTF-8.sql
===================================================================
--- trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.2_to_2.7.3_pgsql_UTF-8.sql	2011-10-03 13:01:03 UTC (rev 8175)
+++ trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.2_to_2.7.3_pgsql_UTF-8.sql	2011-10-03 18:55:55 UTC (rev 8176)
@@ -97,4 +97,21 @@
 NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE fkey_e_id = 'measure_widget' AND var_name = 'pointStrokeWidthDefault');
 
 --get featureInfoTunnel ready for working with toggleModule
-UPDATE gui_element SET e_attributes = NULL WHERE e_id = 'featureInfoTunnel';
\ No newline at end of file
+UPDATE gui_element SET e_attributes = NULL WHERE e_id = 'featureInfoTunnel';
+
+-- Function: f_count_layer_couplings(integer)
+
+DROP FUNCTION f_count_layer_couplings(integer);
+CREATE OR REPLACE FUNCTION f_count_layer_couplings(integer)
+  RETURNS integer AS
+$BODY$
+DECLARE
+   layer_rel int4;
+BEGIN
+layer_rel := count(*) from ows_relation_metadata WHERE fkey_layer_id=$1;
+RETURN layer_rel;
+
+END;
+$BODY$
+  LANGUAGE plpgsql VOLATILE;
+



More information about the Mapbender_commits mailing list