Re: Setting up a database with minimum access rights - Mailing list pgsql-admin

From Jeff Janes
Subject Re: Setting up a database with minimum access rights
Date
Msg-id CAMkU=1wKgv9SC9J-QCZhgWa0-7=bSnQNLD0Ox0pay3ssX52biA@mail.gmail.com
Whole thread Raw
In response to Setting up a database with minimum access rights  (Bo Victor Thomsen <bo.victor.thomsen@gmail.com>)
Responses Re: Setting up a database with minimum access rights  (Bo Victor Thomsen <bo.victor.thomsen@gmail.com>)
List pgsql-admin
On Sun, Apr 26, 2020 at 12:57 PM Bo Victor Thomsen <bo.victor.thomsen@gmail.com> wrote:

...
 
After execution of the above commands, I create a table in schema
"data_schema" using the "postgres" superuser. But I can't access the
created table with user "loki"

Were all the above steps executed as "postgres", or was just the CREATE TABLE statement done as that user?

If it is all done as "postgres" superuser then it works for me.  Your example ALTER DEFAULT PRIVILEGES without specifying the FOR ROLE only applies to objects created by the same user who executed the ALTER DEFAULT PRIVILEGES.

Cheers,

Jeff

pgsql-admin by date:

Previous
From: richard coleman
Date:
Subject: Bug #3787 ???
Next
From: Bo Victor Thomsen
Date:
Subject: Re: Setting up a database with minimum access rights