Re: ALTER DEFAULT PRIVILEGES FOR ROLE is broken

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: ALTER DEFAULT PRIVILEGES FOR ROLE is broken
Date: 2013-04-29 00:51:57
Message-ID: 1682.1367196717@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Josh Berkus <josh(at)agliodbs(dot)com> writes:
> Actually, the problem is worse than I thought. It looks like I can't
> set default privs for any role which is not the owner of the schema:

> analytics2=> ALTER DEFAULT PRIVILEGES IN SCHEMA web GRANT SELECT ON
> TABLES TO dbreader;
> ERROR: permission denied for schema web

The fine manual notes that the target role has to already have CREATE
privileges on the target schema --- maybe that's what's biting you in
this case? If so, I'd agree that this error message is insufficiently
specific, but I don't think the restriction is unreasonable. Without
CREATE privs, there's no particular value in setting default privs for
to-be-created objects.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2013-04-29 01:39:01 Re: ALTER DEFAULT PRIVILEGES FOR ROLE is broken
Previous Message Robert Haas 2013-04-29 00:41:23 Re: Graph datatype addition