1sudo -u postgres psql
2CREATE USER username WITH PASSWORD 'your_password';
3GRANT CONNECT ON DATABASE database_name TO username;
4GRANT USAGE ON SCHEMA schema_name TO username;
5GRANT SELECT ON ALL TABLES IN SCHEMA schema_name TO username;
6ALTER DEFAULT PRIVILEGES IN SCHEMA schema_name
7GRANT SELECT ON TABLES TO username;
8