Re: About permissions on large objects
От | Giuseppe Sacco |
---|---|
Тема | Re: About permissions on large objects |
Дата | |
Msg-id | 1310722785.4673.12.camel@scarafaggio обсуждение исходный текст |
Ответ на | Re: About permissions on large objects (Howard Cole <howardnews@selestial.com>) |
Список | pgsql-general |
Hi Howard, Il giorno mer, 13/07/2011 alle 23.30 +0100, Howard Cole ha scritto: > Hi Guiseppe, > > Perhaps you can create a trigger that monitors for the insertion of an > oid and then grant permissions. No idea if this can be done, but if it > can it will save you lots of repeated grants. [...] Thanks for your tip. I already created a trigger on all my tables, as this one: CREATE OR REPLACE FUNCTION grant_large_object() RETURNS trigger AS ' BEGIN execute ''GRANT SELECT,UPDATE ON LARGE OBJECT '' || NEW.IMAGE || '' TO agenzia_r''; RETURN NEW; END;' LANGUAGE 'plpgsql'; CREATE TRIGGER grant_large_object AFTER INSERT OR UPDATE ON agenzia.imagebydocument FOR EACH ROW EXECUTE PROCEDURE grant_large_object(); And it seems to be working right. I still would like to know if there is any way to query acl metadata, maybe from table pg_catalog.pg_largeobject_metadata in order to collect information about granted rights on large objects. Bye, Giuseppe
В списке pgsql-general по дате отправления: