Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Cannont cast TYPE with a diffrent user then the owner.
Hi Folks.
I've a problem. Shouldn't it be possible to cast TYPEs with an other user than the owner?
I made the following things:
create or replace type test_row as object(test varchar2(15))
/
create type test_array as table of test_row
/
create or replace package test_pack as
function test
return test_array;
end;
/
create or replace package body test_pack as
function test
return test_array
is
t_test test_array := test_array();
begin
t_test.extend; t_test(t_test.last) := test_row('test1'); t_test.extend; t_test(t_test.last) := test_row('test2');--
create public synonym Test_Pack for Test_Pack
/
grant execute on Test_Pack to [2nd user (end user)]
/
grant execute on test_array to [2nd user (end user)]
/
grant execute on test_row to [2nd user (end user)]
/
select * from table(cast(Test_Pack.test as test_array));
this works fine :)
D10PA2_SQL> r
1* select * from table(cast(Test_Pack.test as test_array))
select * from table(cast(Test_Pack.test as test_array))
*
Thanks a lot for your HELP!
Greets
Ody
Received on Tue Dec 02 2003 - 09:42:15 CST
![]() |
![]() |