Accessing objects from another schema

Hi,

I'm logged to the database as userA with quite wide privileges, and creating a view for userB using the SQL Window:

SQL:
create or replace view userB.test_view as
select id
from test_table;

Assuming test_table is owned by userB this view could be compiled successfully. But, when right-clicking on the "test_table" (no mater before or after compilation) PL/SQL developer doesn't recognise the test_table as the database object. It only changes if I change the code to:

SQL:
create or replace view userB.test_view as
select id
from userB.test_table;

Could you fix it?
 
Why do you think the current behaviour is incorrect? If i understood it properly - it is perfectly aligned with the visibility rules - if you as userA run the query "select id from test_table" - you'll either get error, because the table is in another schema? For that reason, you can't right click on the unqualified object and expect some context menu appear in the plsql developer, because the object is currently for you not visible.
But, maybe i have not understood your requirement...

Best regards

Maxim
 
You're right. My idea was that if I prepend test_view with the userB schema name, then PL/SQL Developer should see objects like I was logged in with userB privileges. When I thought about it again, this is a very bad idea.
 
Back
Top