I have user1 and user2 users in PostgreSQL. I have created a database and a scheme called data in PostgreSQL.
In the database, I have executed the following statements:
ALTER DEFAULT PRIVILEGES IN SCHEMA data GRANT ALL ON TABLES TO user1;
ALTER DEFAULT PRIVILEGES IN SCHEMA data GRANT ALL ON TABLES TO user2;
I logged in as user1 and created tables in data schema, then I logged in as user2, and couldn't select * from table1 using user2 credentials.
Is there any way I can create table (future) and give access to user1 & user2, not just the owner of the table?
I am currently using PostgreSQL 13.