In PostgreSQL, created these 2 roles and grant different permissions to them.
create user user1 with login;
create role operator;
grant operator to user1;
create user user2 with login;
create role readwrite;
grant readwrite to user2;
When created a table by user1, such as table1
, user2 can't use this table. It got permission denied.
Is it the right feature for PostgreSQL? If it is, how to make the table also can be used for user2?