Home > Archive > PostgreSQL Administration > January 2006 > alter role









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author alter role
Stijn De Weirdt

2006-01-21, 7:23 am

hi all,

i am looking for a way to list the attributes for a given role. i looked into the docs but didn't find anything directly usable.

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 same as the current ones?)

many thanks

stijn


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Tom Lane

2006-01-21, 1:23 pm

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 directly usable.


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 same as 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

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com