Re: viewing source code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Roberts, Jon escribió:
> So you are saying I need to create a view per user to achieve this?  That
> isn't practical for an enterprise level database.

No -- that would be quite impractical indeed.  I'm talking about
something like

revoke all privileges on pg_proc from public;
create view limited_pg_proc
as select * from pg_proc
where proowner = (select oid from pg_authid where rolname = current_user);
grant select on limited_pg_proc to public;

Of course, it is only a rough sketch.  It needs to be improved in a
number of ways.  But it shows that even with pure SQL the solution is
not far; with backend changes it is certainly doable (for example invent
a separate "view source" privilege for functions).

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux