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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Mar 25 05:11:48 PDT 2019


Author: armin11
Date: 2019-03-25 05:11:48 -0700 (Mon, 25 Mar 2019)
New Revision: 10089

Modified:
   trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.4_to_2.8_pgsql_UTF-8.sql
Log:
fix

Modified: trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.4_to_2.8_pgsql_UTF-8.sql
===================================================================
--- trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.4_to_2.8_pgsql_UTF-8.sql	2019-03-25 12:09:31 UTC (rev 10088)
+++ trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.4_to_2.8_pgsql_UTF-8.sql	2019-03-25 12:11:48 UTC (rev 10089)
@@ -2583,12 +2583,12 @@
     layer_featuretype_relations_json := '[';
 
     IF only_with_wfs_conf = TRUE THEN
-        FOR layer_featuretype_relations_record IN SELECT layer_metadata_featuretype.*, CASE WHEN wfs_conf_id IS NULL THEN 0 ELSE wfs_conf_id END, CASE WHEN wfs_conf_type IS NULL THEN 0 ELSE wfs_conf_type END FROM (SELECT a.fkey_layer_id, CASE WHEN a.fkey_metadata_id IS NULL THEN 0 ELSE a.fkey_metadata_id END, CASE WHEN b.fkey_featuretype_id IS NULL THEN 0 ELSE b.fkey_featuretype_id END FROM (SELECT fkey_layer_id, fkey_metadata_id FROM ows_relation_metadata WHERE fkey_layer_id = ANY ( $1 )) AS a, (SELECT fkey_featuretype_id, fkey_metadata_id FROM ows_relation_metadata WHERE fkey_featuretype_id IS NOT null) AS b WHERE a.fkey_metadata_id = b.fkey_metadata_id) AS layer_metadata_featuretype LEFT JOIN wfs_conf ON layer_metadata_featuretype.fkey_featuretype_id = wfs_conf.fkey_featuretype_id  ORDER by fkey_layer_id DESC LOOP
+        FOR layer_featuretype_relations_record IN SELECT layer_metadata_featuretype.*, CASE WHEN wfs_conf_id IS NULL THEN 0 ELSE wfs_conf_id END, CASE WHEN wfs_conf_type IS NULL THEN 0 ELSE wfs_conf_type END FROM (SELECT a.fkey_layer_id, CASE WHEN a.fkey_metadata_id IS NULL THEN 0 ELSE a.fkey_metadata_id END, CASE WHEN b.fkey_featuretype_id IS NULL THEN 0 ELSE b.fkey_featuretype_id END FROM (SELECT fkey_layer_id, fkey_metadata_id FROM ows_relation_metadata WHERE fkey_layer_id = ANY ( $1 )) AS a, (SELECT fkey_featuretype_id, fkey_metadata_id FROM ows_relation_metadata WHERE fkey_featuretype_id IS NOT null) AS b WHERE a.fkey_metadata_id = b.fkey_metadata_id) AS layer_metadata_featuretype INNER JOIN wfs_conf ON layer_metadata_featuretype.fkey_featuretype_id = wfs_conf.fkey_featuretype_id  ORDER by fkey_layer_id DESC LOOP
         
             layer_featuretype_relations_json := layer_featuretype_relations_json || '{"layerId":' ||layer_featuretype_relations_record.fkey_layer_id || ',"metadataId":' || layer_featuretype_relations_record.fkey_metadata_id || ',"featuretypeId":'|| layer_featuretype_relations_record.fkey_featuretype_id || ',"wfsConfId":'|| layer_featuretype_relations_record.wfs_conf_id || ',"wfsConfType":'|| layer_featuretype_relations_record.wfs_conf_type || '},';
         END LOOP;
     ELSIF only_with_wfs_conf = FALSE THEN
-        FOR layer_featuretype_relations_record IN SELECT layer_metadata_featuretype.*, CASE WHEN wfs_conf_id IS NULL THEN 0 ELSE wfs_conf_id END, CASE WHEN wfs_conf_type IS NULL THEN 0 ELSE wfs_conf_type END FROM (SELECT a.fkey_layer_id, CASE WHEN a.fkey_metadata_id IS NULL THEN 0 ELSE a.fkey_metadata_id END, CASE WHEN b.fkey_featuretype_id IS NULL THEN 0 ELSE b.fkey_featuretype_id END FROM (SELECT fkey_layer_id, fkey_metadata_id FROM ows_relation_metadata WHERE fkey_layer_id = ANY ( $1 )) AS a, (SELECT fkey_featuretype_id, fkey_metadata_id FROM ows_relation_metadata WHERE fkey_featuretype_id IS NOT null) AS b WHERE a.fkey_metadata_id = b.fkey_metadata_id) AS layer_metadata_featuretype INNER JOIN wfs_conf ON layer_metadata_featuretype.fkey_featuretype_id = wfs_conf.fkey_featuretype_id  ORDER by fkey_layer_id DESC LOOP
+        FOR layer_featuretype_relations_record IN SELECT layer_metadata_featuretype.*, CASE WHEN wfs_conf_id IS NULL THEN 0 ELSE wfs_conf_id END, CASE WHEN wfs_conf_type IS NULL THEN 0 ELSE wfs_conf_type END FROM (SELECT a.fkey_layer_id, CASE WHEN a.fkey_metadata_id IS NULL THEN 0 ELSE a.fkey_metadata_id END, CASE WHEN b.fkey_featuretype_id IS NULL THEN 0 ELSE b.fkey_featuretype_id END FROM (SELECT fkey_layer_id, fkey_metadata_id FROM ows_relation_metadata WHERE fkey_layer_id = ANY ( $1 )) AS a, (SELECT fkey_featuretype_id, fkey_metadata_id FROM ows_relation_metadata WHERE fkey_featuretype_id IS NOT null) AS b WHERE a.fkey_metadata_id = b.fkey_metadata_id) AS layer_metadata_featuretype LEFT JOIN wfs_conf ON layer_metadata_featuretype.fkey_featuretype_id = wfs_conf.fkey_featuretype_id  ORDER by fkey_layer_id DESC LOOP
         
             layer_featuretype_relations_json := layer_featuretype_relations_json || '{"layerId":' ||layer_featuretype_relations_record.fkey_layer_id || ',"metadataId":' || layer_featuretype_relations_record.fkey_metadata_id || ',"featuretypeId":'|| layer_featuretype_relations_record.fkey_featuretype_id || ',"wfsConfId":'|| layer_featuretype_relations_record.wfs_conf_id || ',"wfsConfType":'|| layer_featuretype_relations_record.wfs_conf_type || '},';
         END LOOP;



More information about the Mapbender_commits mailing list