Re: alter role - Mailing list pgsql-admin

From Tom Lane
Subject Re: alter role
Date
Msg-id 18532.1137866074@sss.pgh.pa.us
Whole thread Raw
In response to alter role  (Stijn De Weirdt <sdeweird@vub.ac.be>)
List pgsql-admin
Stijn De Weirdt <sdeweird@vub.ac.be> writes:
> i am looking for a way to list the attributes for a given role. i looked into the docs but didn't find anything
directlyusable. 

Look at the queries issued by psql for "\du"

> on a related problem, what actually happens when you issue a
> "ALTER ROLE someone SOME_ATTRIBUTES" if that user is connected to the db?
> (ie when do the changes happen and (for me more intersting) does something happen at all when the attributes are the
sameas the current ones?) 

AFAIR, those changes will propagate when you commit, or at worst at the
user's next transaction start.  I'm not sure if that code tries to
optimize out no-op catalog updates ... look in backend/commands/user.c
to find out.

            regards, tom lane

pgsql-admin by date:

Previous
From: Jaime Casanova
Date:
Subject: Re: Transferring DATA directory
Next
From: Bruno Wolff III
Date:
Subject: Re: What happens to transactions durring a pg_dump?