Re: Setting up a database with minimum access rights

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Bo Victor Thomsen <bo(dot)victor(dot)thomsen(at)gmail(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Setting up a database with minimum access rights
Date: 2020-04-26 17:37:03
Message-ID: CAMkU=1wKgv9SC9J-QCZhgWa0-7=bSnQNLD0Ox0pay3ssX52biA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Sun, Apr 26, 2020 at 12:57 PM Bo Victor Thomsen <
bo(dot)victor(dot)thomsen(at)gmail(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Bo Victor Thomsen 2020-04-26 19:36:51 Re: Setting up a database with minimum access rights
Previous Message richard coleman 2020-04-26 17:08:28 Bug #3787 ???