Обсуждение: alter role

Поиск
Список
Период
Сортировка

alter role

От
Stijn De Weirdt
Дата:
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
directlyusable. 

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?) 

many thanks

stijn


Re: alter role

От
Tom Lane
Дата:
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