Re: viewing source code

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: viewing source code
Дата
Msg-id 20071218185223.GD8088@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: viewing source code  ("Roberts, Jon" <Jon.Roberts@asurion.com>)
Список pgsql-performance
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.

В списке pgsql-performance по дате отправления:

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: viewing source code
Следующее
От: Paul Lambert
Дата:
Сообщение: Optimising a query