I want to create a user with only select privilege for all tables in all databases. I thought that I could get a list of databases and apply the following command for each database:
GRANT select ON DATABASE dbname to user1;
But I got the following error:
ERROR: invalid privilege type SELECT for database
When I googled people advised to do the grant select
operation for all tables. But new tables are being added always. So this is not an acceptable solution for me. Does anyone know any workarounds?