About permissions on large objects

Поиск
Список
Период
Сортировка
От Giuseppe Sacco
Тема About permissions on large objects
Дата
Msg-id 1310543340.4632.145.camel@scarafaggio
обсуждение исходный текст
Ответы Re: About permissions on large objects  (Howard Cole <howardnews@selestial.com>)
Список pgsql-general
Hi all,
I moved a few clusters from 8.4 to 9.0 since I required the new way of
authenticating against LDAP (or, in my case, AD). Now, I found the new
database version introduced permissions on large object, so my
application, in order to share large object across a group, require a
bit of change.

While the application code will be changed in order to give rights on
large objects too, I would like to know if there is any way for listing
current rights, i.e., for finding all large objects that still need to
have permissions changed.

Currently I cannot know how to distinguish what large objects have
already been granted, so I do give permissions to all large objects.
This is quite time consuming, about 5 minutes, and need to be executed a
few times per hour.

This is what I do now:

do $$
declare r record;
begin
for r in select distinct loid from pg_catalog.pg_largeobject loop
   execute 'GRANT SELECT,UPDATE ON LARGE OBJECT ' || r.loid || ' TO agenzia_r';
end loop;
end$$;

Is there a better/faster way?

Thanks,
Giuseppe


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

Предыдущее
От: Shianmiin
Дата:
Сообщение: Re: plpgsql function confusing behaviour
Следующее
От: Nicolas Grilly
Дата:
Сообщение: Re: ts_rank seems very slow (140 ranked documents / second on my machine)