set search_path=vrevisions_trunk, public;

CREATE OR REPLACE VIEW complex_objects_highlight_view AS
 SELECT r.master_id, r.slave_id AS id, r.domain_attrs -> 'rel:slave'::text AS slave_category, r.domain_attrs -> 'rel:role'::text AS slave_role, s.the_geom, s.zmin, s.zmax
   FROM objects_r r, objects s
  WHERE r.slave_id = s.id AND s.the_geom IS NOT NULL;

set search_path=public;
