Re: Large Object permissions lost in transfer

From: Andy Colson <andy(at)squeakycode(dot)net>
To: Howard Cole <howardnews(at)selestial(dot)com>, PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Large Object permissions lost in transfer
Date: 2011-04-04 17:42:40
Message-ID: 4D9A0310.40108@squeakycode.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 4/4/2011 9:19 AM, Howard Cole wrote:
> On 04/04/2011 2:47 PM, Andy Colson wrote:
>>> permissions, - but how do I set up the permissions for the large
>>> objects?
>> I had the same problem. and there is no grant all... there is the new
>> DO though. That's what I used, a simple DO expression to iterate and
>> update the permissions.
>>
>> -Andy
>>
> Thanks Andy. As a temporary measure I am going to use the server
> configuration variable lo_compat_privileges when I work out how to use
> it. For the longer term, could I borrow your script for the DO :)
>

I dont seem to have it anymore... but here is a re-created, untested
version.

do $$
delcare r record;
begin
for r in select loid from pg_catalog.pg_largeobject loop
execute 'ALTER LARGE OBJECT ' || r.loid || ' OWNER TO andy';
end loop;
end$$;

I wanted to change the owner.. where-as you want grant... but it should
get you the idea.

-Andy

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2011-04-04 17:45:11 Re: Large Object permissions lost in transfer
Previous Message Marc-André Goderre 2011-04-04 17:19:43 Re: Trigger vs web service