Creating a role with read only privileges but user is allowed to change password

From: Ravi Roy <ravi(dot)aroy(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: Ravi Roy <ravi(dot)aroy(at)gmail(dot)com>
Subject: Creating a role with read only privileges but user is allowed to change password
Date: 2014-05-11 14:17:22
Message-ID: CAFMBnF_1Gf2poehey0MRkN9T3Crix7XOrebTFOY-uXixzHCxiQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Guys,

I've created a role named "MyRole" in posgresql with the following :

CREATE ROLE "MyRole" NOSUPERUSER LOGIN NOCREATEDB NOCREATEROLE NOINHERIT
PASSWORD "MyPassword";

ALTER ROLE "MyRole" set default_transaction_read_only = on;

Because I wanted this role to readonly (can not change anything in DB but
only view).

But later I realized this role is not even allowed to change his password.
I've tried several permutations and combinations but it does not work.

Can somebody help as how to allow this role to change his password only and
everything else is read only? I'm not sure if this is possible.

Thanks.
Regards
Ravi.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ravi Roy 2014-05-11 14:30:12 Re: Creating a role with read only privileges but user is allowed to change password
Previous Message David G Johnston 2014-05-11 13:42:56 Re: Partitioning such that key field of inherited tables no longer retains any selectivity