Re: [ADMIN] readonly user

From: Geoff Winkless <pgsqladmin(at)geoff(dot)dj>
To: Stefan Carl <stefancarl89(at)web(dot)de>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>, Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: [ADMIN] readonly user
Date: 2014-09-24 15:25:08
Message-ID: CAEzk6fdZ=Y=zPX6GBEWo4D+9M9PmABXLSsR-Sv=+z9fd18LAOg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

On 24 September 2014 15:45, Stefan Carl <stefancarl89(at)web(dot)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?

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2014-09-24 15:35:04 Re: format() function with string_agg
Previous Message Stefan Carl 2014-09-24 14:45:53 readonly user

Browse pgsql-general by date

  From Date Subject
Next Message Daniel Lenski 2014-09-24 16:04:21 Why can't I select un-grouped columns when grouping by a (non-primary) unique key?
Previous Message Stefan Carl 2014-09-24 14:45:53 readonly user