1 FUNCTION grantpath_to_string(path IN grant_path)
2 RETURN VARCHAR2 IS
3 result VARCHAR2(19350) := null; -- grant_path (150*128) + delimiter(1*150)
4 BEGIN
5 IF path is null OR path.count = 0 THEN
6 return result;
7 END IF;
8
9 FOR i IN path.FIRST .. path.LAST LOOP
10 result := result || ',' || path(i);
11 END LOOP;
12
13 RETURN substr(result, 2); -- remove the leading delimiter
14 END;