   EXECUTE
   $string$
       select
-        column_id,
+        column_id boundary_id,
         obs_column.description,
-        table_id
+        timespan time_span,
+        tablename
       FROM
         observatory.OBS_table,
         observatory.OBS_column_table,
         observatory.OBS_column
       WHERE
         observatory.OBS_column_table.column_id = observatory.obs_column.id
+        observatory.OBS_column_table.table_id = observatory.obs_table.id
       AND
         observatory.OBS_column.type='Geometry'
       AND

  search_term text,
  relevant_boundary text DEFAULT null
)
RETURNS TABLE(description text, name text, aggregate text, source text)  as $$
DECLARE
  boundary_term text;
BEGIN


  RETURN QUERY
  EXECUTE format($string$
              SELECT id, description,
                name,
                  aggregate,
                  replace(split_part(id,'".', 1),'"', '') source
