From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: ALTER DEFAULT PRIVILEGES FOR ROLE is broken |
Date: | 2013-04-29 11:05:32 |
Message-ID: | CA+Tgmoat=vYwWSUV1tLOtHdZ5+-yjeCqm8YNtTAoBB_KCt2M-w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, Apr 28, 2013 at 9:39 PM, Josh Berkus <josh(at)agliodbs(dot)com> wrote:
>> 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?
>
> Nope. That was the first thing I thought of. It really is that the
> target role must *own* the schema. So clearly a bug.
wfm.
rhaas=# create user bob;
CREATE ROLE
rhaas=# create schema we_like_bob;
CREATE SCHEMA
rhaas=# alter default privileges for role bob in schema we_like_bob
grant select on tables to bob;
ERROR: permission denied for schema we_like_bob
rhaas=# grant create on schema we_like_bob to bob;
GRANT
rhaas=# alter default privileges for role bob in schema we_like_bob
grant select on tables to bob;
ALTER DEFAULT PRIVILEGES
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Fabien COELHO | 2013-04-29 12:42:40 | [PATCH] add --throttle option to pgbench |
Previous Message | Ashutosh Bapat | 2013-04-29 05:55:35 | Re: Functional dependencies and GROUP BY - for subqueries |