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

From Igal @ Lucee.org
Subject Re: [GENERAL] Permissions for Web App
Date
Msg-id 327616c7-637f-ce49-5098-90d9e140a580@lucee.org
Whole thread Raw
In response to Re: [GENERAL] Permissions for Web App  (Stephen Frost <sfrost@snowman.net>)
Responses Re: [GENERAL] Permissions for Web App
List pgsql-general
Stephen,

On 10/10/2017 6:14 AM, Stephen Frost wrote:

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.

You mean that if I execute the ALTER DEFAULT command above as user `postgres` then only tables created by user `postgres` will give default privileges to role `webapp`?

I usually only create tables with user `postgres` but this is a bit confusing, or at least unclear from the syntax of the command.

Thanks,

Igal Sapir
Lucee Core Developer
Lucee.org

pgsql-general by date:

Previous
From: "Peter J. Holzer"
Date:
Subject: Re: [GENERAL] "Shared strings"-style table
Next
From: "David G. Johnston"
Date:
Subject: Re: [GENERAL] "Shared strings"-style table