-- -- acs_object__get_attr_storage_table/1 -- create or replace function acs_object__get_attr_storage_table( text ) returns text as $$ declare v_vals alias for $1; v_idx integer; v_tmp varchar; begin v_idx := strpos(v_vals,','); if v_idx = 0 or v_vals is null then raise exception 'invalid storage format: acs_object.get_attr_storage_table %',v_vals; end if; v_tmp := substr(v_vals,v_idx + 1); v_idx := strpos(v_tmp,','); if v_idx = 0 then raise exception 'invalid storage format: acs_object.get_attr_storage_table %',v_vals; end if; return substr(v_tmp,1,v_idx - 1); end;$$ language plpgsql;