[Mapbender-commits] r9329 - in trunk/mapbender/resources/db: . pgsql/UTF-8/update

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Dec 3 08:03:10 PST 2015


Author: armin11
Date: 2015-12-03 08:03:10 -0800 (Thu, 03 Dec 2015)
New Revision: 9329

Modified:
   trunk/mapbender/resources/db/materialize_dataset_view.sql
   trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.4_to_2.8_pgsql_UTF-8.sql
Log:
Bugfix for dataset search views

Modified: trunk/mapbender/resources/db/materialize_dataset_view.sql
===================================================================
--- trunk/mapbender/resources/db/materialize_dataset_view.sql	2015-12-03 15:13:41 UTC (rev 9328)
+++ trunk/mapbender/resources/db/materialize_dataset_view.sql	2015-12-03 16:03:10 UTC (rev 9329)
@@ -35,10 +35,18 @@
   (md_topic_cats);
 -- Index: idx_wst_dataset_dataset_id
 
--- DROP INDEX idx_wst_dataset_dataset_id;
+-- DROP INDEX idx_wst_dataset_metadata_id;
 
+CREATE INDEX idx_wst_dataset_metadata_id
+  ON dataset_search_table
+  USING btree
+  (metadata_id);
+
+-- DROP INDEX idx_wst_dataset_metadata_id;
+
 CREATE INDEX idx_wst_dataset_dataset_id
   ON dataset_search_table
   USING btree
   (dataset_id);
 
+

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	2015-12-03 15:13:41 UTC (rev 9328)
+++ trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.4_to_2.8_pgsql_UTF-8.sql	2015-12-03 16:03:10 UTC (rev 9329)
@@ -702,6 +702,9 @@
 
 -- DROP FUNCTION f_get_coupled_resources(integer);
 
+DROP VIEW search_dataset_view; --depends in following function
+
+
 CREATE OR REPLACE FUNCTION f_get_coupled_resources(integer)
   RETURNS text AS
 $BODY$DECLARE
@@ -749,10 +752,10 @@
 
 -- View: search_dataset_view
 
-DROP VIEW search_dataset_view;
 
+
 CREATE OR REPLACE VIEW search_dataset_view AS 
- SELECT dataset_dep.fkey_mb_user_id AS user_id, dataset_dep.dataset_id, dataset_dep.srs AS dataset_srs, dataset_dep.title, dataset_dep.abstract AS dataset_abstract, f_collect_searchtext_dataset(dataset_dep.dataset_id) AS searchtext, dataset_dep.dataset_timestamp, dataset_dep.department, dataset_dep.mb_group_name, dataset_dep.mb_group_title, dataset_dep.mb_group_country, 0 AS load_count, dataset_dep.mb_group_stateorprovince, f_collect_inspire_cat_dataset(dataset_dep.dataset_id) AS md_inspire_cats, f_collect_custom_cat_dataset(dataset_dep.dataset_id) AS md_custom_cats, f_collect_topic_cat_dataset(dataset_dep.dataset_id) AS md_topic_cats, dataset_dep.bbox AS the_geom, (((((st_xmin(dataset_dep.bbox::box3d)::text || ','::text) || st_ymin(dataset_dep.bbox::box3d)::text) || ','::text) || st_xmax(dataset_dep.bbox::box3d)::text) || ','::text) || st_ymax(dataset_dep.bbox::box3d)::text AS bbox, dataset_dep.preview_url, dataset_dep.fileidentifier, f_get_coupled_resources(dataset_dep.dataset_id)
  as coupled_resources, dataset_dep.mb_group_logo_path
+ SELECT dataset_dep.fkey_mb_user_id AS user_id, dataset_dep.dataset_id ,dataset_dep.dataset_id as metadata_id, dataset_dep.srs AS dataset_srs, dataset_dep.title, dataset_dep.abstract AS dataset_abstract, f_collect_searchtext_dataset(dataset_dep.dataset_id) AS searchtext, dataset_dep.dataset_timestamp, dataset_dep.department, dataset_dep.mb_group_name, dataset_dep.mb_group_title, dataset_dep.mb_group_country, 0 AS load_count, dataset_dep.mb_group_stateorprovince, f_collect_inspire_cat_dataset(dataset_dep.dataset_id) AS md_inspire_cats, f_collect_custom_cat_dataset(dataset_dep.dataset_id) AS md_custom_cats, f_collect_topic_cat_dataset(dataset_dep.dataset_id) AS md_topic_cats, dataset_dep.bbox AS the_geom, (((((st_xmin(dataset_dep.bbox::box3d)::text || ','::text) || st_ymin(dataset_dep.bbox::box3d)::text) || ','::text) || st_xmax(dataset_dep.bbox::box3d)::text) || ','::text) || st_ymax(dataset_dep.bbox::box3d)::text AS bbox, dataset_dep.preview_url, dataset_dep.fileidentifier, f_get_co
 upled_resources(dataset_dep.dataset_id) as coupled_resources, dataset_dep.mb_group_logo_path
    FROM ( SELECT mb_metadata.the_geom AS bbox, mb_metadata.ref_system AS srs, mb_metadata.metadata_id AS dataset_id, mb_metadata.title, mb_metadata.abstract, mb_metadata.lastchanged AS dataset_timestamp, mb_metadata.uuid AS fileidentifier, mb_metadata.preview_image AS preview_url, mb_metadata.fkey_mb_user_id, user_dep.mb_group_id AS department, user_dep.mb_group_name, user_dep.mb_group_title, user_dep.mb_group_country, user_dep.mb_group_stateorprovince, user_dep.mb_group_logo_path
            FROM ( SELECT registrating_groups.fkey_mb_user_id AS mb_user_id, mb_group.mb_group_id, mb_group.mb_group_name, mb_group.mb_group_title, mb_group.mb_group_country, mb_group.mb_group_stateorprovince, mb_group.mb_group_logo_path
                    FROM registrating_groups, mb_group



More information about the Mapbender_commits mailing list