Let’s create a new user for PostgreSQL with read-only permission
postgres
superuser.CREATE ROLE
or CREATE USER
command to create a new user. CREATE USER
is effectively the same as CREATE ROLE
but with the LOGIN ability enabled by default.readonly_user
the ability to read data from all existing and future tables in the public
schema of target_database
.