Re: [ADMIN] readonly user - Mailing list pgsql-general

From Geoff Winkless
Subject Re: [ADMIN] readonly user
Date
Msg-id CAEzk6fdZ=Y=zPX6GBEWo4D+9M9PmABXLSsR-Sv=+z9fd18LAOg@mail.gmail.com
Whole thread Raw
In response to readonly user  ("Stefan Carl" <stefancarl89@web.de>)
List pgsql-general
On 24 September 2014 15:45, Stefan Carl <stefancarl89@web.de> wrote:
ALTER DEFAULT PRIVILEGES FOR ddl_user IN SCHEMA public GRANT SELECT ON TABLES TO
readonly;
ALTER DEFAULT PRIVILEGES FOR ddl_user IN SCHEMA public GRANT SELECT ON SEQUENCES
TO readonly;
ALTER DEFAULT PRIVILEGES FOR ddl_user IN SCHEMA public GRANT EXECUTE ON FUNCTIONS
TO readonly;
 
The second part (New objects) is very important from my point of view, but it does not work.

​Doesn't work how? Query fails? Or the permissions don't get granted?

What's the ddl_user role? Have you created it? Does it work if you leave the target role as the default? ie just run the ALTER DEFAULT without the "FOR ddl_user" section?

pgsql-general by date:

Previous
From: Fred Jonsson
Date:
Subject: Question about row_number() ordering semantics
Next
From: Daniel Lenski
Date:
Subject: Why can't I select un-grouped columns when grouping by a (non-primary) unique key?