ALTER DEFAULT PRIVILEGES FOR ROLE is broken

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org>
Subject: ALTER DEFAULT PRIVILEGES FOR ROLE is broken
Date: 2013-04-29 00:00:42
Message-ID: 517DB82A.9000704@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Folks,

The "FOR ROLE" syntax is completely broken, as of 9.2.4. Not sure when
exactly this got broken; I remember it working sometime in the past:

[jberkus(at)pgx-test ~]$ psql -U postgres analytics2
psql (9.2.4)
Type "help" for help.

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

... in fact, there is no combination of actions which will make "FOR
ROLE" work. Any invokation of "FOR ROLE" inevitably results in a
"permission denied" message:

analytics2=> \c - webui
You are now connected to database "analytics2" as user "webui".
analytics2=> ALTER DEFAULT PRIVILEGES FOR ROLE webui IN SCHEMA web
GRANT SELECT ON TABLES TO dbreader;
ERROR: permission denied for schema web

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2013-04-29 00:11:13 Re: ALTER DEFAULT PRIVILEGES FOR ROLE is broken
Previous Message Tom Lane 2013-04-29 00:00:17 Re: Analyzing bug 8049