 end;
 $$ language 'plpgsql' immutable;
 
--- returns all relations the supplied feature is member of, with the
--- additional column link_tags, e.g. "role"=>"stop", "index"=>"492", "member_id"=>"n1231934421"
-create or replace function objects_relation_member_of(member_id text)
+create or replace function objects_relation(text)
 returns setof pgmapcss_parent_object
 as $$
 #variable_conflict use_variable
 declare
-  w text[];
-  bbox text;
-begin
+  relation_id bigint;
+begin
+  relation_id := cast(substring($1, 2) as bigint);
+
   return query select
     'r' || id,
     t.tags,

  ;
end;
$$ language 'plpgsql' immutable;

      from
	planet_osm_rels
      where
	id = relation_id
      ) t
    group by
      id,
