Re: [GENERAL] Permissions for Web App - Mailing list pgsql-general

From Stephen Frost
Subject Re: [GENERAL] Permissions for Web App
Date
Msg-id 20171010131456.GW4628@tamriel.snowman.net
Whole thread Raw
In response to Re: [GENERAL] Permissions for Web App  ("Igal @ Lucee.org" <igal@lucee.org>)
Responses Re: [GENERAL] Permissions for Web App
List pgsql-general
Greetings,

* Igal @ Lucee.org (igal@lucee.org) wrote:
> It worked, thanks!

Be sure to check that you're really getting what you want here.

> For future reference and for the benefit of others, the command that
> I ran is:
>
>   ALTER DEFAULT PRIVILEGES IN SCHEMA public
>     GRANT SELECT, INSERT, UPDATE, DELETE ON TABLES TO webapp;

Note that DEFAULT PRIVILEGES apply to a specific role (in the above
case, whatever CURRENT_USER is) and therefore will only be helpful if
you only have one user creating tables, in this case.

There's been a lot of questions and discussions about having an actual
'read only' role that can be granted out.  Now that we've actually got
default roles in PG, this is something that becomes at least somewhat
more practical and might be able to happen for PG11 if there's interest
and effort put into it.

Thanks!

Stephen

pgsql-general by date:

Previous
From: Stephen Frost
Date:
Subject: Re: [GENERAL] pg_start/stop_backup naming conventions
Next
From: Vladimir Nicolici
Date:
Subject: Re: [GENERAL] Strange checkpoint behavior - checkpoints take a long time