I am attempting to secure a database made up of multiple schemas as follows:-
-public
-foo
-bar
-foobar
I want to create a user who can access any schema for read, can create tables in bar and can inert/update/delete in foo,bar and foobar
I would prefer to create user as a database superuser and then remove privileges as required.
I thought:-
CREATE USER test_superuser;
GRANT ALL on DATABASE test to test_superuser;
Would do this, but after these commands test_superuser cannot access the schema.
How can I create a user that has the permissions of postgres superuser but only on a named database?