Re: ALTER DEFAULT PRIVILEGES FOR ROLE is broken - Mailing list pgsql-hackers

From Robert Haas
Subject Re: ALTER DEFAULT PRIVILEGES FOR ROLE is broken
Date
Msg-id CA+Tgmoat=vYwWSUV1tLOtHdZ5+-yjeCqm8YNtTAoBB_KCt2M-w@mail.gmail.com
Whole thread Raw
In response to Re: ALTER DEFAULT PRIVILEGES FOR ROLE is broken  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
On Sun, Apr 28, 2013 at 9:39 PM, Josh Berkus <josh@agliodbs.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



pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: Functional dependencies and GROUP BY - for subqueries
Next
From: Fabien COELHO
Date:
Subject: [PATCH] add --throttle option to pgbench