changeset 6655:86b17c675374

Cast ld values to varchar in user artifacts statement The problem appears to be that now with v in the artifactsdb as a TEXT datatype that we get CLOBS as a result here. To make the old stuff work we cast the ld_ values that are evalutated in datacage functions back to varchar and thus to strings.
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 24 Jul 2013 19:03:33 +0200
parents 6f42a62d0cf2
children 85ca64599445
files artifacts/doc/conf/meta-data.xml
diffstat 1 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/doc/conf/meta-data.xml	Wed Jul 24 18:20:16 2013 +0200
+++ b/artifacts/doc/conf/meta-data.xml	Wed Jul 24 19:03:33 2013 +0200
@@ -2448,17 +2448,21 @@
 
     <dc:macro name="all-user-artifacts">
         <dc:context connection="user">
-        <dc:comment>Select collections and masterartifacts.</dc:comment>
+          <dc:comment>Select collections and masterartifacts.
+            XXX: The cast is a quick hack because the ld_* values are
+            now TEXT fields. To properly fix / asses the problems here
+            an SLT evaluation is needed.
+          </dc:comment>
         <dc:statement>
           SELECT c.name                     AS collection_name,
                  ma.id                      AS a_id,
                  ma.state                   AS a_state,
                  ma.gid                     AS a_gid,
                  ma.creation                AS a_creation,
-                 COALESCE(ma.ld_mode, '')      AS ld_m,
-                 COALESCE(ma.ld_locations, '') AS ld_l,
-                 COALESCE(ma.ld_from, '')      AS ld_f,
-                 COALESCE(ma.ld_to, '')        AS ld_t,
+                 CAST(COALESCE(ma.ld_mode, '') AS VARCHAR(255)) AS ld_m,
+                 CAST(COALESCE(ma.ld_locations, '') AS VARCHAR(255)) AS ld_l,
+                 CAST(COALESCE(ma.ld_from, '') AS VARCHAR(255)) AS ld_f,
+                 CAST(COALESCE(ma.ld_to, '') AS VARCHAR(255)) AS ld_t,
                  o.name                        AS out_name,
                  o.id                          AS out_id,
                  f.name                        AS facet_name,

http://dive4elements.wald.intevation.org