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,