Creating a read only user in the Postgresql docker

I would like to create a read only user to access the postgres server.

The use case is that I would like to connect some external analytics tools to the postgres server directly. I can currently do that by connecting to the “admin” user. However, this user does have write access and if possible, I would like to limit any account that can connect to being read only.

I realize that there is another user called “postgres”, and that this user has Superuser as well as CREATEUSER roles. The user “admin”, while having write access, does not have those roles and thus I am unable to use it to create a read only user.

Hi @YuaNWA. Someone in the community might be able to help with this, but since it is more of a Postgres question, you probably will get better responses by asking on Stackoverflow with the postgresql tag :slight_smile: