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