I have created a role called "role1" with these steps :
postgres=# CREATE ROLE role1; CREATE ROLE postgres=# GRANT CONNECT ON DATABASE paybills TO role1; GRANT postgres=# \c paybills You are now connected to database "paybills". paybills=# GRANT SELECT, UPDATE, INSERT, DELETE ON myeg_users TO role1; GRANT
The steps above are all successful.
However, when I run the command below :
paybills=# GRANT role1 TO surentran; ERROR: role "surentran" does not exist
As you can see, an error is thrown. I am in the db called "paybills", and the user details are stored in a table called "myeg_users" within this database.
How do I add all the users in the "myeg_users" table into the role "role1"?