-- -- acs_object_util__get_object_type/1 -- create or replace function acs_object_util__get_object_type( integer ) returns varchar as $$ declare p_object_id alias for $1; v_object_type varchar(100); begin select object_type into v_object_type from acs_objects where object_id = p_object_id; if not found then raise exception 'acs_object_util__get_object_type: Invalid Object id: % ', p_object_id; end if; return v_object_type; end;$$ language plpgsql;